@@ -18,28 +18,49 @@ the top-level contains some example build scripts which are lightweight to build
18
18
└── setup.sh
19
19
```
20
20
here:
21
- - ** build** : Contains scripts, Dockerfiles for building different variants
21
+ - ** build** : Contains scripts, Dockerfiles for building different variants (outdated)
22
22
- ** core** : contains binaries and different sources that used in the build process
23
23
- ** out** : All the filesystem and tarball packages are created here
24
24
- ** plugins** : contains scripts that combine core sources to make tarball building easy
25
25
<hr >
26
26
27
27
** important files/folders to notice**
28
28
###### ` ~/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 ```
30
31
- useful functions in ` envsetup ` :
31
32
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
34
36
35
37
``` bash
36
38
do_mount " /path/to/fs"
37
39
```
38
40
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
+
40
45
``` bash
41
46
do_build " out/udroid-test" " arm64"
42
47
```
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
+
43
64
###### TODO ( need to write more )
44
65
45
66
# AIM
@@ -68,12 +89,13 @@ do_build "out/fs" "arm64"
68
89
- ` includes_packages() ` : takes care of extrapackges when a variable ` INCLUDE_PACKAGES ` is set with packages
69
90
- ` do_build() ` : bootstraps linux to with target arch to target directorie
70
91
- ` 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
72
94
- ` 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
74
96
- - ` 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() `
77
99
- ` do_compress() ` : takes care of compressing tarballs without messy device file
78
100
- - ` do_tar_gzip() ` : to compress in gzip format
79
101
- - ` do_tar_bzip() ` : to compress in bzip format
@@ -88,6 +110,12 @@ do_build "out/fs" "arm64"
88
110
89
111
### Environment Variables
90
112
- ` 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
+ ```
91
119
- ` INCLUDE_PACKAGES ` : to set extra packages to install in the bootstrap process
92
120
- ` SUITE ` : to set target suite to bootstrap
93
121
0 commit comments