{"id":17987198,"url":"https://github.com/rpendleton/mazda-toolchain","last_synced_at":"2025-04-04T03:13:28.827Z","repository":{"id":80787338,"uuid":"48836108","full_name":"rpendleton/mazda-toolchain","owner":"rpendleton","description":"crosstool-ng project that configures a toolchain for the Mazda Connect CMU","archived":false,"fork":false,"pushed_at":"2024-06-23T02:34:32.000Z","size":23,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T14:44:54.604Z","etag":null,"topics":["cmu","embedded","infotainment","mazda"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rpendleton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2015-12-31T05:59:31.000Z","updated_at":"2024-06-23T02:34:34.000Z","dependencies_parsed_at":"2024-12-17T06:08:03.553Z","dependency_job_id":"64f85c3f-4d62-440b-8151-187f69f64081","html_url":"https://github.com/rpendleton/mazda-toolchain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpendleton%2Fmazda-toolchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpendleton%2Fmazda-toolchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpendleton%2Fmazda-toolchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpendleton%2Fmazda-toolchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rpendleton","download_url":"https://codeload.github.com/rpendleton/mazda-toolchain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247112771,"owners_count":20885606,"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","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":["cmu","embedded","infotainment","mazda"],"created_at":"2024-10-29T19:07:32.410Z","updated_at":"2025-04-04T03:13:28.809Z","avatar_url":"https://github.com/rpendleton.png","language":null,"readme":"# Mazda Linux Toolchain\n\nThis repository contains configuration files necessary to compile a toolchain\nsuitable for cross compiling software for the Mazda Connect system, which is\nincluded in newer Mazda cars. It was tested on the 2016 Mazda 6, but the process\nshould be similar for other models.\n\nThese configuration files were created for use with OS X, but but should work\nwith other platforms after minor adjustments.\n\n## Warning\n\nThis project is not for the faint-of-heart. By making modifications to the\nMazda Connect system, you're putting yourself at risk. Regardless of how much\nexperience you have, if you're not careful, there is a very high chance your\ndevice will get stuck in a boot loop. If you don't understand the full extent\nof what the goal of this project is or how it works, I recommend that you stop\nhere.\n\nThis guide makes some assumptions about the knowledge you already have. If you\nrun into troubles, feel free to file issues. However, most of the steps should\nbe fairly easy to understand as long as you know what you're doing.\n\n## Setup\n\n1. Make sure you're using a case-sensitive filesystem before continuing. On Mac,\n   you can create a sparse image and do all of your work inside of it. Ensure\n   the partition you're saving data on is at least 20 GB large. If you don't,\n   you may run out of space towards the end of the process.\n\n2. Download this repository:\n\n   ```\n   git clone https://github.com/rpendleton/mazda-toolchain.git mazda-toolchain\n   cd mazda-toolchain\n   ```\n\n3. Download the Freescale Linux kernel. The processor used by Mazda Connect is\n   based on the Freescale i.MX6. You can download the proper Linux kernel source\n   tree from Freescale's git repository.\n\n   For cmu150_NA_55.00.753A, this is linux-2.6-imx#3.0.35-4.1.0. If you are\n   cloning the kernel to a different folder, make sure you update the custom\n   Linux kernel path in the ct-ng config file.\n\n   ```shell\n   # from mazda-toolchain\n   git clone git://git.freescale.com/imx/linux-2.6-imx.git linux-freescale-3.0.35\n   cd linux-freescale-3.0.35\n   git checkout imx_3.0.35_4.1.0\n   ```\n\n4. Obtain the Linux kernel configuration file from your vehicle. You can get the\n   config file from an existing Mazda Connect system by loading the `configs.ko`\n   kernel module, and then copying `/proc/config.gz`. I've included a copy of\n   my config for convenience.\n\n   ```shell\n   # from linux-freescale-3.0.35\n   ssh root@192.168.53.1\n   insmod /lib/modules/3.0.35/kernel/kernel/configs.ko\n   exit\n\n   scp root@192.168.53.1:/proc/config.gz config.gz\n   gzip -d config.gz\n   mv config .config\n   ```\n\n5. Update config to add missing values. In some cases, the config file obtained\n   from your car may not include all of the values that are present in the\n   Freescale repository. You can add any new options by running the following,\n   similar to how you would a regular Linux kernel:\n\n   ```shell\n   # from linux-freescale-3.0.35\n   make ARCH=arm oldconfig\n   ```\n\n6. Patch the kernel headers. One of the headers exported by Freescale depends on\n   non-exported headers. Rather than exporting some internal headers, it's\n   easier to simply un-export the one header.\n\n   Open the `include/linux/Kbuild` file and comment/remove the line that exports\n   the `fsl_devices.h` header.\n\n7. Install and check the headers. Make sure that make doesn't emit any errors,\n   or you will encounter a build failure a few minutes into your build.\n\n   ```shell\n   # from linux-freescale-3.0.35\n   make ARCH=arm headers_install\n   make ARCH=arm headers_check\n   ```\n\n8. We're ready to begin compiling the toolchain. This process took thirty\n   minutes on my computer, but the time required may vary. If you don't have\n   crosstool-ng, install it before running this step.\n\n   ```shell\n   # from linux-freescale-3.0.35\n   cd ../\n   ct-ng build\n   ```\n\n9. Transfer shared libraries to your Mazda Connect system. Since glibc isn't\n   supported on all platforms (specifically OS X), this toolchain uses musl.\n   Because of this, you'll need to transfer a few libraries from `sysroot/lib`\n   and `sysroot/usr/lib`. Since you made it this far, I'll assume you can figure\n   out which libraries are necessary for your application.\n\n   Alternatively, you can link all of your programs with musl statically, but\n   this will increase the size of your programs.\n\n10. Start playing with your new toolchain!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpendleton%2Fmazda-toolchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frpendleton%2Fmazda-toolchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpendleton%2Fmazda-toolchain/lists"}