{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":"VisualC","path":"VisualC","contentType":"directory"},{"name":"Xcode-iOS","path":"Xcode-iOS","contentType":"directory"},{"name":"Xcode","path":"Xcode","contentType":"directory"},{"name":"acinclude","path":"acinclude","contentType":"directory"},{"name":"android-project","path":"android-project","contentType":"directory"},{"name":"build-scripts","path":"build-scripts","contentType":"directory"},{"name":"cmake","path":"cmake","contentType":"directory"},{"name":"debian","path":"debian","contentType":"directory"},{"name":"include","path":"include","contentType":"directory"},{"name":"src","path":"src","contentType":"directory"},{"name":"test","path":"test","contentType":"directory"},{"name":".hgignore","path":".hgignore","contentType":"file"},{"name":"Android.mk","path":"Android.mk","contentType":"file"},{"name":"BUGS.txt","path":"BUGS.txt","contentType":"file"},{"name":"CMakeLists.txt","path":"CMakeLists.txt","contentType":"file"},{"name":"COPYING.txt","path":"COPYING.txt","contentType":"file"},{"name":"CREDITS.txt","path":"CREDITS.txt","contentType":"file"},{"name":"INSTALL.txt","path":"INSTALL.txt","contentType":"file"},{"name":"Makefile.in","path":"Makefile.in","contentType":"file"},{"name":"Makefile.minimal","path":"Makefile.minimal","contentType":"file"},{"name":"Makefile.pandora","path":"Makefile.pandora","contentType":"file"},{"name":"Makefile.psp","path":"Makefile.psp","contentType":"file"},{"name":"Makefile.wiz","path":"Makefile.wiz","contentType":"file"},{"name":"README-SDL.txt","path":"README-SDL.txt","contentType":"file"},{"name":"README-android.txt","path":"README-android.txt","contentType":"file"},{"name":"README-cmake.txt","path":"README-cmake.txt","contentType":"file"},{"name":"README-directfb.txt","path":"README-directfb.txt","contentType":"file"},{"name":"README-gesture.txt","path":"README-gesture.txt","contentType":"file"},{"name":"README-hg.txt","path":"README-hg.txt","contentType":"file"},{"name":"README-ios.txt","path":"README-ios.txt","contentType":"file"},{"name":"README-macosx.txt","path":"README-macosx.txt","contentType":"file"},{"name":"README-pandora.txt","path":"README-pandora.txt","contentType":"file"},{"name":"README-platforms.txt","path":"README-platforms.txt","contentType":"file"},{"name":"README-porting.txt","path":"README-porting.txt","contentType":"file"},{"name":"README-psp.txt","path":"README-psp.txt","contentType":"file"},{"name":"README-raspberrypi.txt","path":"README-raspberrypi.txt","contentType":"file"},{"name":"README-touch.txt","path":"README-touch.txt","contentType":"file"},{"name":"README-wince.txt","path":"README-wince.txt","contentType":"file"},{"name":"README.txt","path":"README.txt","contentType":"file"},{"name":"SDL2.spec.in","path":"SDL2.spec.in","contentType":"file"},{"name":"TODO.txt","path":"TODO.txt","contentType":"file"},{"name":"VisualC.html","path":"VisualC.html","contentType":"file"},{"name":"WhatsNew.txt","path":"WhatsNew.txt","contentType":"file"},{"name":"autogen.sh","path":"autogen.sh","contentType":"file"},{"name":"configure","path":"configure","contentType":"file"},{"name":"configure.in","path":"configure.in","contentType":"file"},{"name":"sdl2-config.in","path":"sdl2-config.in","contentType":"file"},{"name":"sdl2.m4","path":"sdl2.m4","contentType":"file"},{"name":"sdl2.pc.in","path":"sdl2.pc.in","contentType":"file"}],"totalCount":49}},"fileTreeProcessingTime":5.558231,"foldersToFetch":[],"repo":{"id":330008801,"defaultBranch":"main","name":"SDL","ownerLogin":"libsdl-org","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2021-01-15T19:55:54.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/77683370?v=4","public":true,"private":false,"isOrgOwned":true},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"e9d21339345223698304772c60ca1175b618dd6d","listCacheKey":"v0:1709678518.0","canEdit":false,"refType":"tree","currentOid":"e9d21339345223698304772c60ca1175b618dd6d"},"path":"README-raspberrypi.txt","currentUser":null,"blob":{"rawLines":["================================================================================\r","SDL2 for Raspberry Pi\r","================================================================================\r","\r","Requirements:\r","\r","Raspbian (other Linux distros may work as well).\r","\r","================================================================================\r"," Features\r","================================================================================\r","\r","* Works without X11\r","* Hardware accelerated OpenGL ES 2.x\r","* Sound via ALSA\r","* Input (mouse/keyboard/joystick) via EVDEV\r","* Hotplugging of input devices via UDEV\r","\r","================================================================================\r"," Raspbian Build Dependencies\r","================================================================================\r","\r","sudo apt-get install libudev-dev libasound2-dev libdbus-1-dev\r","\r","You also need the VideoCore binary stuff that ships in /opt/vc for EGL and \r","OpenGL ES 2.x, it usually comes pre installed, but in any case:\r"," \r","sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev\r","\r","================================================================================\r"," Cross compiling from x86 Linux\r","================================================================================\r","\r","To cross compile SDL for Raspbian from your desktop machine, you'll need a\r","Raspbian system root and the cross compilation tools. We'll assume these tools\r","will be placed in /opt/rpi-tools\r","\r"," sudo git clone --depth 1 https://github.com/raspberrypi/tools /opt/rpi-tools\r","\r","You'll also need a Rasbian binary image.\r","Get it from: http://downloads.raspberrypi.org/raspbian_latest \r","After unzipping, you'll get file with a name like: -wheezy-raspbian.img\r","Let's assume the sysroot will be built in /opt/rpi-sysroot.\r","\r"," export SYSROOT=/opt/rpi-sysroot\r"," sudo kpartx -a -v .img\r"," sudo mount -o loop /dev/mapper/loop0p2 /mnt\r"," sudo cp -r /mnt $SYSROOT\r"," sudo apt-get install qemu binfmt-support qemu-user-static\r"," sudo cp /usr/bin/qemu-arm-static $SYSROOT/usr/bin\r"," sudo mount --bind /dev $SYSROOT/dev\r"," sudo mount --bind /proc $SYSROOT/proc\r"," sudo mount --bind /sys $SYSROOT/sys\r","\r","Now, before chrooting into the ARM sysroot, you'll need to apply a workaround,\r","edit $SYSROOT/etc/ld.so.preload and comment out all lines in it.\r","\r"," sudo chroot $SYSROOT\r"," apt-get install libudev-dev libasound2-dev libdbus-1-dev libraspberrypi0 libraspberrypi-bin libraspberrypi-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev libxss-dev\r"," exit\r"," sudo umount $SYSROOT/dev\r"," sudo umount $SYSROOT/proc\r"," sudo umount $SYSROOT/sys\r"," sudo umount /mnt\r","\r","The final step is compiling SDL itself.\r","\r"," export CC=\"/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux\"\r"," cd \r"," mkdir -p build;cd build\r"," ../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd\r"," make\r"," make install\r","\r","To be able to deploy this to /usr/local in the Raspbian system you need to fix up a few paths:\r"," \r"," perl -w -pi -e \"s#$PWD/rpi-sdl2-installed#/usr/local#g;\" ./rpi-sdl2-installed/lib/libSDL2.la ./rpi-sdl2-installed/lib/pkgconfig/sdl2.pc ./rpi-sdl2-installed/bin/sdl2-config\r"," \r","================================================================================\r"," Apps don't work or poor video/audio performance\r","================================================================================\r","\r","If you get sound problems, buffer underruns, etc, run \"sudo rpi-update\" to \r","update the RPi's firmware. Note that doing so will fix these problems, but it\r","will also render the CMA - Dynamic Memory Split functionality useless.\r","\r","Also, by default the Raspbian distro configures the GPU RAM at 64MB, this is too\r","low in general, specially if a 1080p TV is hooked up.\r","\r","See here how to configure this setting: http://elinux.org/RPiconfig\r","\r","Using a fixed gpu_mem=128 is the best option (specially if you updated the \r","firmware, using CMA probably won't work, at least it's the current case).\r","\r","================================================================================\r"," No input\r","================================================================================\r","\r","Make sure you belong to the \"input\" group.\r","\r"," sudo usermod -aG input `whoami`\r","\r","================================================================================\r"," No HDMI Audio\r","================================================================================\r","\r","If you notice that ALSA works but there's no audio over HDMI, try adding:\r"," \r"," hdmi_drive=2\r"," \r","to your config.txt file and reboot.\r","\r","Reference: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=5062\r","\r","================================================================================\r"," Text Input API support\r","================================================================================\r","\r","The Text Input API is supported, with translation of scan codes done via the\r","kernel symbol tables. For this to work, SDL needs access to a valid console.\r","If you notice there's no SDL_TEXTINPUT message being emmited, double check that\r","your app has read access to one of the following:\r"," \r","* /proc/self/fd/0\r","* /dev/tty\r","* /dev/tty[0...6]\r","* /dev/vc/0\r","* /dev/console\r","\r","This is usually not a problem if you run from the physical terminal (as opposed\r","to running from a pseudo terminal, such as via SSH). If running from a PTS, a \r","quick workaround is to run your app as root or add yourself to the tty group,\r","then re login to the system.\r","\r"," sudo usermod -aG tty `whoami`\r"," \r","The keyboard layout used by SDL is the same as the one the kernel uses.\r","To configure the layout on Raspbian:\r"," \r"," sudo dpkg-reconfigure keyboard-configuration\r"," \r","To configure the locale, which controls which keys are interpreted as letters,\r","this determining the CAPS LOCK behavior:\r","\r"," sudo dpkg-reconfigure locales\r","\r","================================================================================\r"," Notes\r","================================================================================\r","\r","* When launching apps remotely (via SSH), SDL can prevent local keystrokes from\r"," leaking into the console only if it has root privileges. Launching apps locally\r"," does not suffer from this issue.\r"," \r","\r"],"stylingDirectives":[[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]],"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/libsdl-org/SDL/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"README-raspberrypi.txt","displayUrl":"https://github.com/libsdl-org/SDL/blame/e9d21339345223698304772c60ca1175b618dd6d/README-raspberrypi.txt?raw=true","headerInfo":{"blobSize":"6.48 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":null,"isGitLfs":false,"onBranch":false,"shortPath":"0724a8c","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Flibsdl-org%2FSDL%2Fblame%2Fe9d21339345223698304772c60ca1175b618dd6d%2FREADME-raspberrypi.txt","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"155","truncatedSloc":"110"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"Text","languageID":372,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/libsdl-org/SDL/blame/e9d21339345223698304772c60ca1175b618dd6d/README-raspberrypi.txt","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/libsdl-org/SDL/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/libsdl-org/SDL/raw/e9d21339345223698304772c60ca1175b618dd6d/README-raspberrypi.txt","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":true,"symbols":[]}},"copilotInfo":null,"copilotAccessAllowed":false,"blame":{"ranges":{"1":{"start":1,"oldStart":1,"end":22,"oldEnd":22,"commitOid":"9ceed73db4d35abac19aee1d162a28b745f621ce","reblamePath":null},"23":{"start":23,"oldStart":23,"end":23,"oldEnd":23,"commitOid":"b39a4daf04da3cff44ff5f019eb3964bf22240df","reblamePath":"README-raspberrypi.txt"},"24":{"start":24,"oldStart":24,"end":29,"oldEnd":29,"commitOid":"9ceed73db4d35abac19aee1d162a28b745f621ce","reblamePath":null},"30":{"start":30,"oldStart":30,"end":71,"oldEnd":71,"commitOid":"f6fa41588c6c7664b265da7ad4e27de1e2ae0880","reblamePath":"README-raspberrypi.txt"},"72":{"start":72,"oldStart":72,"end":73,"oldEnd":73,"commitOid":"074a1c4c6393daab1c20dbf5b7e3e7b5d37db592","reblamePath":"README-raspberrypi.txt"},"74":{"start":74,"oldStart":72,"end":74,"oldEnd":72,"commitOid":"f6fa41588c6c7664b265da7ad4e27de1e2ae0880","reblamePath":"README-raspberrypi.txt"},"75":{"start":75,"oldStart":75,"end":78,"oldEnd":78,"commitOid":"074a1c4c6393daab1c20dbf5b7e3e7b5d37db592","reblamePath":"README-raspberrypi.txt"},"79":{"start":79,"oldStart":73,"end":94,"oldEnd":88,"commitOid":"f6fa41588c6c7664b265da7ad4e27de1e2ae0880","reblamePath":"README-raspberrypi.txt"},"95":{"start":95,"oldStart":30,"end":102,"oldEnd":37,"commitOid":"b39a4daf04da3cff44ff5f019eb3964bf22240df","reblamePath":"README-raspberrypi.txt"},"103":{"start":103,"oldStart":30,"end":114,"oldEnd":41,"commitOid":"9ceed73db4d35abac19aee1d162a28b745f621ce","reblamePath":null},"115":{"start":115,"oldStart":50,"end":146,"oldEnd":81,"commitOid":"b39a4daf04da3cff44ff5f019eb3964bf22240df","reblamePath":"README-raspberrypi.txt"},"147":{"start":147,"oldStart":42,"end":150,"oldEnd":45,"commitOid":"9ceed73db4d35abac19aee1d162a28b745f621ce","reblamePath":null},"151":{"start":151,"oldStart":151,"end":154,"oldEnd":154,"commitOid":"e9d21339345223698304772c60ca1175b618dd6d","reblamePath":"README-raspberrypi.txt"},"155":{"start":155,"oldStart":146,"end":155,"oldEnd":146,"commitOid":"f6fa41588c6c7664b265da7ad4e27de1e2ae0880","reblamePath":"README-raspberrypi.txt"}},"commits":{"9ceed73db4d35abac19aee1d162a28b745f621ce":{"oid":"9ceed73db4d35abac19aee1d162a28b745f621ce","message":"Raspberry Pi support (also unified UDEV and EVDEV support)","shortMessageHtmlLink":"Raspberry Pi support (also unified UDEV and EVDEV support)","authorAvatarUrl":"https://avatars.githubusercontent.com/u/395944?s=80&v=4","committerName":"Gabriel Jacobo","committerEmail":"gabomdq@gmail.com","committedDate":"2013-09-28T13:28:19.000-03:00","firstParentOid":"b9a22308066bfdd9eb8f8282eb057a01fbbc6324"},"b39a4daf04da3cff44ff5f019eb3964bf22240df":{"oid":"b39a4daf04da3cff44ff5f019eb3964bf22240df","message":"SDL_TEXTINPUT support for EVDEV","shortMessageHtmlLink":"SDL_TEXTINPUT support for EVDEV","authorAvatarUrl":"https://avatars.githubusercontent.com/u/395944?s=80&v=4","committerName":"Gabriel Jacobo","committerEmail":"gabomdq@gmail.com","committedDate":"2013-10-03T10:28:10.000-03:00","firstParentOid":"1f21484bdd2c0e97b17899176c4e88067432308b"},"f6fa41588c6c7664b265da7ad4e27de1e2ae0880":{"oid":"f6fa41588c6c7664b265da7ad4e27de1e2ae0880","message":"Updates the Raspberry Pi README","shortMessageHtmlLink":"Updates the Raspberry Pi README","authorAvatarUrl":"https://avatars.githubusercontent.com/u/395944?s=80&v=4","committerName":"Gabriel Jacobo","committerEmail":"gabomdq@gmail.com","committedDate":"2013-10-12T11:35:47.000-03:00","firstParentOid":"9a0954c5108cfb7d7bb6bf4a4b0893015b302722"},"074a1c4c6393daab1c20dbf5b7e3e7b5d37db592":{"oid":"074a1c4c6393daab1c20dbf5b7e3e7b5d37db592","message":"Fixes X11 video backend compilation when no GL is available\n\nFor example, in our Raspberry Pi sysroot.","shortMessageHtmlLink":"Fixes X11 video backend compilation when no GL is available","authorAvatarUrl":"https://avatars.githubusercontent.com/u/395944?s=80&v=4","committerName":"Gabriel Jacobo","committerEmail":"gabomdq@gmail.com","committedDate":"2013-10-12T16:29:34.000-03:00","firstParentOid":"7bc9815772d0b89334a9a67b69da8a7daf80b1ff"},"e9d21339345223698304772c60ca1175b618dd6d":{"oid":"e9d21339345223698304772c60ca1175b618dd6d","message":"Prevent keystrokes from leaking through to the console when using evdev.\n\nThis uses the same method Weston and X use. Sadly, to be fully effective when\nlaunching remotely, this needs root permissions.","shortMessageHtmlLink":"Prevent keystrokes from leaking through to the console when using evdev.","authorAvatarUrl":"https://avatars.githubusercontent.com/u/395944?s=80&v=4","committerName":"Gabriel Jacobo","committerEmail":"gabomdq@gmail.com","committedDate":"2013-10-13T17:15:43.000-03:00","firstParentOid":"074a1c4c6393daab1c20dbf5b7e3e7b5d37db592"}},"ignoreRevs":{"path":".git-blame-ignore-revs","present":false,"timedOut":null}},"csrf_tokens":{"/libsdl-org/SDL/branches":{"post":"7ZuuyGs-9x6fFhNeCOZNnVaiORWFP0UVqSagLJ1b3n-GQRyjsuFZFiYEk01S5_xLF4KDFmuT0giwaG6pbdlMzw"},"/repos/preferences":{"post":"9Q2ZP79Do_1Rxc1_zVYW0LlBrDghRFuQNKgWUHUJAOzQJFsqJajCcHrkMcyr00VuhI84-GdsA5UemrrQMlVAzA"}}},"title":"Blaming SDL/README-raspberrypi.txt at e9d21339345223698304772c60ca1175b618dd6d ยท libsdl-org/SDL"}