{"id":16520300,"url":"https://github.com/kclyu/rpi_rootfs","last_synced_at":"2025-10-26T09:38:55.057Z","repository":{"id":243325437,"uuid":"70508429","full_name":"kclyu/rpi_rootfs","owner":"kclyu","description":"This repo provides a python script that takes the necessary files from the running Raspberry Pi and uses rsync to fetch the files and make the Root FS for the cross compile environment.","archived":false,"fork":false,"pushed_at":"2020-06-12T11:55:22.000Z","size":63,"stargazers_count":16,"open_issues_count":0,"forks_count":11,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-08T17:13:07.490Z","etag":null,"topics":["gcc","raspberry-pi","raspberry-pi-rootfs","rpi-rootfs","rsync","sysroot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kclyu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-10T16:46:29.000Z","updated_at":"2025-03-04T10:52:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"84ea31cf-665b-42c5-916f-b2d0d323803e","html_url":"https://github.com/kclyu/rpi_rootfs","commit_stats":null,"previous_names":["kclyu/rpi_rootfs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kclyu/rpi_rootfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kclyu%2Frpi_rootfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kclyu%2Frpi_rootfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kclyu%2Frpi_rootfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kclyu%2Frpi_rootfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kclyu","download_url":"https://codeload.github.com/kclyu/rpi_rootfs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kclyu%2Frpi_rootfs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281086021,"owners_count":26441337,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gcc","raspberry-pi","raspberry-pi-rootfs","rpi-rootfs","rsync","sysroot"],"created_at":"2024-10-11T16:50:19.618Z","updated_at":"2025-10-26T09:38:55.051Z","avatar_url":"https://github.com/kclyu.png","language":"Python","readme":"# RootFS for Raspberry PI\nThis repo provides tools to create rootfs so that you can create a cross compile environment for Raspberry PI on Ubuntu Linux using bash script and python.\n\nThere are two ways to create rootfs. The first is to create a rootfs directly using a Raspbian OS image file. The other way is to create a rootfs using rsync from the Raspberry PI hardware you're already running.\n\nAnd, this repo provide google Drive Link to download Custom Compiled GCC. If you are not familiar with cross compiler and do not have your own cross compiler, please download and use GCC from `Custom Compiled GCC for Raspberry PI` below.\n\nFor an example of compiling OpenCV and ffmpeg, see the `Cross Compiling Examples` section below.\n\n\n## Making RootFS with Raspbian OS image file\n```\ncd ~/Workspace/rpi_rootfs\n./build_rootfs.sh\nUsage: .//build_rootfs.sh command [options]\n  command:\n    download : download latest RaspiOS image\n    create [image file]:\n      [image file]: raspi OS image zip/img file\n    update : run apt update \u0026 full-upgrade \u0026 autoremove in rootfs\n    run [command]: run raspberry pi command in rootfs\n      [command]: should be escaped with double-quote and\n      command need to be full path of command\n      e.g. ./build_rootfs.sh run \"/usr/bin/apt -y libpulse-dev\"\n        - install libpulse-dev package in rootfs\n      e.g. ./build_rootfs.sh run \"/usr/bin/apt autoremove\"\n        - run apt autoremove in rootfs\n    clean : removing rootfs\n    docker : build rpi_rootfs docker image\n./build_rootfs.sh create ./2020-MM-DD-raspios-buster-armhf.img  # note1\n```\n*note1 : Download the image file from [Raspberry PI download page](https://www.raspberrypi.org/downloads/raspberry-pi-os/) and if possible, use the img file after unzip the img.zip file after download completed.*\n## Making RootFS with rsync \n```\ncd ~/Workspace/rpi_rootfs\nmkdir -p rootfs\n./rpi_rootfs.py \nUsage: ./rpi_rootfs.py @hostname\u003e \u003crootfs path\u003e\n./rpi_rootfs.py pi@your-raspberry-pi-ipaddress rootfs\n```\n*When rpi_rootfs.py is executed, many messages are output to console during the sync list of files and library link fixing. Please ignore the messages.*\n\nIf you installed a new library or software on Raspberry PI, please execute it again to apply the changed part.\n\n## Custom Compiled GCC for Raspberry PI\n\n```\ncd ~/Workspace/rpi_rootfs\nmkdir tools\ncd tools\n../scripts/gdrive_download.sh 1q7Zk-7NhVROrBBWVgm56PbndZauSZL27 gcc-linaro-8.3.0-2019.03-x86_64_arm-linux-gnueabihf.tar.xz\n#...\n#Saving to: ‘gcc-linaro-8.3.0-2019.03-x86_64_arm-linux-gnueabihf.tar.xz’\n#...\nxz -dc gcc-linaro-8.3.0-2019.03-x86_64_arm-linux-gnueabihf.tar.xz  | tar xvf -\nln -sf gcc-linaro-8.3.0-2019.03-x86_64_arm-linux-gnueabihf  arm-linux-gnueabihf\ncd /opt\nsudo ln -sf ~/Workspace/rpi_rootfs\nexport PATH=/opt/rpi_rootfs/tools/arm-linux-gnueabihf/bin:$PATH\n```\n\n| URL| md5sum | Remarks|\n| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | --------------- |\n| [gcc-linaro-8.3.0-2019.03-x86_64_arm-linux-gnueabihf.tar.xz](https://drive.google.com/open?id=1q7Zk-7NhVROrBBWVgm56PbndZauSZL27) | 633025d696d55ca0a3a099be8e34db23 | Raspbian Buster |\n\n\n## Cross Compiling Examples\nThe example below is based on the installation of rpi_rootfs and custom compiled gcc. Please use as needed.\nThe following list is an example of source packages cross compiled using rpi_rootfs.\n- [WebRTC native-code source package](https://webrtc.org/native-code/development/)\n- [libwebsockets](https://github.com/warmcat/libwebsockets)\n- [OpenCV 3.x](https://github.com/opencv/opencv)\n- [h264bitstream](https://github.com/aizvorski/h264bitstream)\n- [x264](git://git.videolan.org/x264) and [ffmpeg]( git://source.ffmpeg.org/ffmpeg.git) \n\n#### PI.cmake\nIt is a CMAKE_TOOLCHAIN_FILE definition file for cmake used when cross compile using cmake. You can cross compile using cmake with toolchanin provided by rpi_rootfs as follows.\n\n```\ncd  cmake_source_distribution_root_path\nmkdir build\ncd build\ncmake -DCMAKE_TOOLCHAIN_FILE=~/Workspace/rpi_rootfs/PI.cmake  -DCMAKE_BUILD_TYPE=Debug ..\n```\n#### Building WebRTC native-code package\nFor more information, please refer to the [README_building.md](https://github.com/kclyu/rpi-webrtc-streamer/blob/master/README_building.md) document of rpi-webrtc-streamer\n\n#### Building x264 and ffmpeg\nPlease refer to [README_ffmpeg_building.md](../master/README_ffmpeg_building.md). for how to build ffmpeg for Raspberry PI using rpi_toolfs.\n\n#### Building OpenCV 3.x example\n```\ncd ~/Workspace\ngit clone https://github.com/opencv/opencv.git\ncd opencv\nmkdir arm_build\ncd arm_build\ncmake -DCMAKE_TOOLCHAIN_FILE=~/Workspace/rpi_rootfs/PI.cmake  .. -DENABLE_CXX11=ON \\\n\t-DENABLE_NEON=ON -DDENABLE_VFPV3=ON -DWITH_PNG=ON -DWITH_TBB=ON -DWITH_TIFF=ON \\\n\t-DWITH_OPENGL=ON -DCMAKE_INSTALL_PREFIX=~/Workspace/rpi_rootfs\nmake\n```\n\n## Cross Compile WebRTC native code package\n\nPlease refer to [README_building.md document](https://github.com/kclyu/rpi-webrtc-streamer/blob/master/README_building.md) document of Rpi-WebRTC-Streamer for WebRTC native code package Cross Compile.\n \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkclyu%2Frpi_rootfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkclyu%2Frpi_rootfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkclyu%2Frpi_rootfs/lists"}