chore: initial project setup

- Add Dockerfile for build environment
- Add docker-compose.yml for container orchestration
- Add docker-entrypoint.sh for build process automation
- Add .env for environment configuration
- Add .gitignore for ignoring build artifacts and temporary files
- Add README.md with build instructions
- Add LICENSE (Apache 2.0)
This commit is contained in:
akadmin 2025-09-29 09:45:42 +03:00
commit c5e7c48779
8 changed files with 607 additions and 0 deletions

136
README.md Normal file
View file

@ -0,0 +1,136 @@
# How to Build IodeOs with Docker
## Why Docker?
Using Docker ensures all required dependencies are pre-installed and properly configured.
You dont need to install complex toolchains or modify your host system.
---
## Requirements
### Software
- **Docker**
Install Docker using the official script:
```bash
curl -fsSL https://get.docker.com | sh
```
- **Git**
[Install Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- **Repo tool**
Install the Google `repo` tool:
```bash
mkdir -p ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH=~/bin:$PATH
```
### Hardware
- **Disk:** SSD recommended
* Total required: \~638 GB
* \~394 GB source code
* \~244 GB build artifacts
- **CPU:** 64-bit processor (Intel i5/i7 or AMD Ryzen 5/7 and above recommended, 8 cores or more preferred)
- **Memory:**
* Minimum: 16 GB RAM
* Bare minimum: 8 GB RAM (with swap; builds will be very slow and unstable)
---
## Usage
1. **Clone this repo** to your local machine and navigate into it:
```bash
git clone https://git.os-source.co/IodeOs/build.git
cd build
```
2. **Initialize and sync the repo** into the `IodeOs/build` checkout directory:
```bash
repo init -u https://git.os-source.co/IodeOs/manifests_android -b v6-staging
```
3. **Sync the repo** (this may take a while):
```bash
repo sync
```
> 💡 **Tip:** You can speed up and stabilize the sync process with additional options:
>
> ```bash
> repo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags -f
> ```
>
> * `-c` : Sync only the current manifest branch
> * `-j$(nproc --all)` : Use all available CPU cores for parallel sync
> * `--force-sync` : Discard local changes and ensure a clean state
> * `--no-clone-bundle` : Skip using potentially outdated pre-packaged bundles
> * `--no-tags` : Avoid downloading all Git tags (saves time/space)
> * `-f` : Continue syncing other projects even if one fails
4. **Start the build with Docker**:
```bash
docker compose up -d
```
5. **Check the build logs and wait**:
```bash
docker logs -f repo_build_iode
```
6. Once the "success message" appears in the logs (this typically takes 90240 minutes, depending on your hardware and
the number of threads used), navigate to the out folder to find your OTA package or fastboot images.
---
## Troubleshooting
### Repo tool not found
If you see:
```
command not found: repo
```
Make sure `~/bin` is in your `PATH`:
```bash
export PATH=~/bin:$PATH
```
Add it to your `~/.bashrc` or `~/.zshrc` to make the change permanent.
---
### Repo sync is very slow or stalls
* Use more jobs with `-j<number>` (e.g. `repo sync -j16`) if you have a fast CPU and good network.
* If syncing fails, retry with:
```bash
repo sync --force-sync --no-clone-bundle --no-tags
```
---
## Licensing
IodeOs/build is licensed under the **Apache License, Version 2.0**.
See [LICENSE](LICENSE) for the full license text.