Skip to content

Commit 4d2fb90

Browse files
committed
Update CONTRIBUTING.md
1 parent 5e2482e commit 4d2fb90

File tree

1 file changed

+37
-9
lines changed

1 file changed

+37
-9
lines changed

CONTRIBUTING.md

+37-9
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,49 @@ the top-level contains some example build scripts which are lightweight to build
1818
└── setup.sh
1919
```
2020
here:
21-
- **build**: Contains scripts, Dockerfiles for building different variants
21+
- **build**: Contains scripts, Dockerfiles for building different variants (outdated)
2222
- **core**: contains binaries and different sources that used in the build process
2323
- **out**: All the filesystem and tarball packages are created here
2424
- **plugins**: contains scripts that combine core sources to make tarball building easy
2525
<hr>
2626

2727
**important files/folders to notice**
2828
###### `~/plugins/envsetup`
29-
contains functions that can be used for cmd line building and integrating in scripts
29+
- contains functions that can be used for cmd line building and integrating in scripts
30+
- **Important** : use these functions after ```source plugins/envsetup```
3031
- useful functions in `envsetup`:
3132

32-
<kbd>do_mount()</kbd>: mounts the rootfs directories in recursive after checking is directories already mounted
33-
> takes one argument: location of rootfs directorie
33+
<kbd>**do_mount()**</kbd>: mounts the rootfs directories in recursive after checking is directories already mounted
34+
35+
> takes one argument: location of rootfs directory
3436
3537
```bash
3638
do_mount "/path/to/fs"
3739
```
3840

39-
<kbd>do_build()</kbd> bootstraps linux to a directories of specified arch
41+
<kbd>**do_build()**</kbd> bootstraps linux to a directories of specified arch
42+
43+
> takes two arguments: `location of rootfs directory` | `arch`
44+
4045
```bash
4146
do_build "out/udroid-test" "arm64"
4247
```
48+
> available architectures : `amd64` , `arm64` , `armhf`
49+
50+
<kbd>**do_compress**()</kbd> compress the rootfs directory into an archive
51+
52+
> takes one argument: name of rootfs directory
53+
54+
```bash
55+
# archiving into .tar.gz
56+
OVERRIDER_COMPRESSION_TYPE="gzip"
57+
# already default to "out/" directory
58+
do_compress "udroid-test"
59+
# output would be "out/udroid-test.tar.gz"
60+
```
61+
> default format is `bzip` ( .tar.xz )
62+
> others : `gzip` ( .tar.gz ) , `lz` ( .tar.lz ) , `zstd` ( .zst )
63+
4364
###### TODO ( need to write more )
4465

4566
# AIM
@@ -68,12 +89,13 @@ do_build "out/fs" "arm64"
6889
- `includes_packages()`: takes care of extrapackges when a variable `INCLUDE_PACKAGES` is set with packages
6990
- `do_build()`: bootstraps linux to with target arch to target directorie
7091
- `do_second_stage()`: if foreign arch triggers second stage
71-
- - `do_qemu_user_emulation()` sets up qemu binaries in chroot
92+
- - `do_qemu_user_emulation()`: sets up qemu binaries in chroot
93+
- `setup_user()`: setup a user in chroot if `ENABLE_USER_SETUP` is set to true
7294
- `do_chroot_ae()`: to run command in chroot
73-
- - `do_chroot_proot_ae` : use **proot** instead of chroot in termux
95+
- - `do_chroot_proot_ae`: use **proot** instead of chroot in termux
7496
- - `run_cmd()`: alternative for `do_chroot_ae()`
75-
- - `run_shell_script()` : to run a specific script, alternative for `do_chroot_ae()`
76-
- - `install_pkg()` : to install a specific package inside chroot, alternative for `do_chroot_ae()`
97+
- - `run_shell_script()`: to run a specific script, alternative for `do_chroot_ae()`
98+
- - `install_pkg()`: to install a specific package inside chroot, alternative for `do_chroot_ae()`
7799
- `do_compress()`: takes care of compressing tarballs without messy device file
78100
- - `do_tar_gzip()`: to compress in gzip format
79101
- - `do_tar_bzip()`: to compress in bzip format
@@ -88,6 +110,12 @@ do_build "out/fs" "arm64"
88110

89111
### Environment Variables
90112
- `ENABLE_EXIT` ( true | false ): to exit on error
113+
- `ENABLE_USER_SETUP` ( true | false ): to setup a user, using with `FS_USER` and `FS_PASS`
114+
```bash
115+
ENABLE_USER_SETUP=true
116+
FS_USER="your username"
117+
FS_PASS="your password"
118+
```
91119
- `INCLUDE_PACKAGES`: to set extra packages to install in the bootstrap process
92120
- `SUITE`: to set target suite to bootstrap
93121

0 commit comments

Comments
 (0)