Skip to content

Commit ea58971

Browse files
committed
hotfix: update remaining paths and names
1 parent 5ad9662 commit ea58971

File tree

8 files changed

+27
-27
lines changed

8 files changed

+27
-27
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
4848
- name: Run Tests
4949
run: |
50-
python3 -m pre_commit run --files builder/**/*.py
50+
python3 -m pre_commit run --files zkb/**/*.py
5151
5252
- name: Build
5353
run: |

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ RUN \
3333
#
3434
# The main idea here is that we pre-pack all the tools into the Docker/Podman image that can be used for any device:
3535
# (toolchains, binutils -- everything except device-specific kernel source);
36-
#
36+
#
3737
# This significantly reduces the total build time, as each time we make a build call for a device,
3838
# only device-specific kernel source is being downloaded into the container.
3939
#
4040
RUN curl -LsSf https://astral.sh/uv/$(cat ./requirement-uv.txt | awk -F'==' '{print $2}' | tr -d ' \n')/install.sh | sh && \
4141
. $HOME/.local/bin/env && \
4242
uv sync --frozen --no-install-project && \
43-
uv run ${WDIR}/builder/utils/bridge.py --shared
43+
uv run ${WDIR}/zkb/utils/bridge.py --shared
4444

4545
# activate .venv
4646
CMD [ "source", ".venv/bin/activate" ]

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ The kernel has the following features:
7878

7979
## Usage
8080

81-
The custom build wrapper (aka "builder") consists of 2 core components and 3 primary commands:
81+
The custom build wrapper (aka "zkb") consists of 2 core components and 3 primary commands:
8282

8383
Components:
8484

@@ -92,8 +92,8 @@ Commands:
9292
- `bundle`.
9393

9494
```help
95-
$ python3 builder --help
96-
usage: builder [-h] [--clean] {kernel,assets,bundle} ...
95+
$ python3 zkb --help
96+
usage: zkb [-h] [--clean] {kernel,assets,bundle} ...
9797
9898
A custom builder for the zero_kernel.
9999
@@ -124,7 +124,7 @@ To run this tool in a `local` environment, you will need:
124124
```sh
125125
# install uv version from project file
126126
python3 -m pip install -r requirement-uv.txt
127-
# make builder/ internal imports visible to itself
127+
# make zkb/ internal imports visible to itself
128128
export PYTHONPATH=$(pwd)
129129
# prepare and activate dev environment
130130
uv sync --frozen --no-install-project
@@ -138,8 +138,8 @@ Once you are finished working with the project, don't forget to disable the virt
138138
Kernel build process can be launched using the `kernel` subcommand.
139139

140140
```help
141-
$ python3 builder kernel --help
142-
usage: builder kernel [-h] --build-env {local,docker,podman} --base {los,pa,x,aosp}
141+
$ python3 zkb kernel --help
142+
usage: zkb kernel [-h] --build-env {local,docker,podman} --base {los,pa,x,aosp}
143143
--codename CODENAME --lkv LKV [-c] [--clean-image] [--ksu]
144144
145145
options:
@@ -161,8 +161,8 @@ options:
161161
As mentioned, there is also an asset downloader, which can collect latest versions of ROM, TWRP, Magisk and it's modules, Kali Chroot etc.
162162

163163
```help
164-
$ python3 builder assets --help
165-
usage: builder assets [-h] --build-env {local,docker,podman} --base {los,pa,x,aosp}
164+
$ python3 zkb assets --help
165+
usage: zkb assets [-h] --build-env {local,docker,podman} --base {los,pa,x,aosp}
166166
--codename CODENAME --chroot {full,minimal} [--rom-only]
167167
[--clean-image] [--clean] [--ksu]
168168
@@ -203,8 +203,8 @@ Options `full` and `conan` collect all of the assets required to successfuly fla
203203
Option named `slim` is a much lighter version of `full` packaging, as only the ROM is collected from the asset list. This is done to reduce package sizes while ensuring the kernel+ROM compatibility.
204204

205205
```help
206-
$ python3 builder bundle --help
207-
usage: builder bundle [-h] --build-env {local,docker,podman} --base {los,pa,x,aosp}
206+
$ python3 zkb bundle --help
207+
usage: zkb bundle [-h] --build-env {local,docker,podman} --base {los,pa,x,aosp}
208208
--codename CODENAME --lkv LKV --package-type
209209
{conan,slim,full} [--conan-upload] [--clean-image] [--ksu]
210210
@@ -231,19 +231,19 @@ Here are some examples of commands:
231231
**(Recommended)** Build kernel and collect ROM via Docker:
232232

233233
```sh
234-
python3 builder bundle --build-env=docker --base=los --codename=dumpling --lkv=4.4 --package-type=slim
234+
python3 zkb bundle --build-env=docker --base=los --codename=dumpling --lkv=4.4 --package-type=slim
235235
```
236236

237237
Build kernel locally:
238238

239239
```sh
240-
python3 builder kernel --build-env=local --base=los --codename=dumpling --lkv=4.4
240+
python3 zkb kernel --build-env=local --base=los --codename=dumpling --lkv=4.4
241241
```
242242

243243
Collect all of the assets locally:
244244

245245
```sh
246-
python3 builder assets --build-env=local --base=los --codename=dumpling --package-type=full
246+
python3 zkb assets --build-env=local --base=los --codename=dumpling --package-type=full
247247
```
248248

249249
## See also

conanfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def build(self):
2323
self.options.codename,
2424
self.options.chroot
2525
)
26-
cmd = "python3 builder kernel {0} &&"\
27-
"python3 builder assets {0} --clean"\
26+
cmd = "python3 zkb kernel {0} &&"\
27+
"python3 zkb assets {0} --clean"\
2828
.format(shared_args)
2929
print(f"[cmd] {cmd}")
3030
self.run(cmd)

zkb/configs/argument.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def check_settings(self) -> None:
6666

6767
# check if specified device is supported
6868
with open(
69-
Path(__file__).absolute().parents[2] / "builder" / "manifests" / "devices.json", encoding="utf-8"
69+
Path(__file__).absolute().parents[2] / "zkb" / "manifests" / "devices.json", encoding="utf-8"
7070
) as f:
7171
devices = json.load(f)
7272

zkb/core/kernel_builder.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,11 @@ def patch_anykernel3(self) -> None:
273273
cm.remove(self.rmanager.paths["AnyKernel3"] / "models")
274274

275275
fo.ucopy(
276-
dcfg.root / "builder" / "modifications" / self._ucodename / "anykernel3" / "ramdisk",
276+
dcfg.root / "zkb" / "modifications" / self._ucodename / "anykernel3" / "ramdisk",
277277
self.rmanager.paths["AnyKernel3"] / "ramdisk"
278278
)
279279
fo.ucopy(
280-
dcfg.root / "builder" / "modifications" / self._ucodename / "anykernel3" / "anykernel.sh",
280+
dcfg.root / "zkb" / "modifications" / self._ucodename / "anykernel3" / "anykernel.sh",
281281
self.rmanager.paths["AnyKernel3"] / "anykernel.sh"
282282
)
283283

@@ -448,7 +448,7 @@ def patch_ksu(self) -> None:
448448
# either patch kernel or KernelSU sources, depending on Linux kernel version
449449
target_d = dcfg.root / "KernelSU" if self.lkv_src == "4.14" else self.rmanager.paths[self.codename]
450450
fo.ucopy(
451-
dcfg.root / "builder" / "modifications" / self._ucodename / self.lkv_src / patch_name,
451+
dcfg.root / "zkb" / "modifications" / self._ucodename / self.lkv_src / patch_name,
452452
target_d
453453
)
454454
os.chdir(target_d)
@@ -461,7 +461,7 @@ def patch_qcacld(self) -> None:
461461
goback = Path.cwd()
462462

463463
fo.ucopy(
464-
dcfg.root / "builder" / "modifications" / self._ucodename / self.lkv_src / patch_name,
464+
dcfg.root / "zkb" / "modifications" / self._ucodename / self.lkv_src / patch_name,
465465
self.rmanager.paths[self.codename]
466466
)
467467
os.chdir(self.rmanager.paths[self.codename])
@@ -494,7 +494,7 @@ def patch_kernel(self) -> None:
494494

495495
# apply .patch files
496496
fo.ucopy(
497-
dcfg.root / "builder" / "modifications" / self._ucodename / self.lkv_src,
497+
dcfg.root / "zkb" / "modifications" / self._ucodename / self.lkv_src,
498498
self.rmanager.paths[self.codename],
499499
("kernelsu-compat.patch", "qcacld_pa.patch")
500500
)

zkb/engines/generic_container.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def check_cache(self) -> bool:
8181
@property
8282
def builder_cmd(self) -> str:
8383
# prepare launch command
84-
cmd = f"python3 {Path('builder', 'utils', 'bridge.py')}"
84+
cmd = f"python3 {Path('zkb', 'utils', 'bridge.py')}"
8585
arguments = {
8686
"--command": self.command,
8787
"--codename": self.codename,

zkb/managers/resource.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ def read_data(self) -> None:
3939
device = ""
4040

4141
# load JSON data
42-
with open(dcfg.root / "builder" / "manifests" / "tools.json", encoding="utf-8") as f:
42+
with open(dcfg.root / "zkb" / "manifests" / "tools.json", encoding="utf-8") as f:
4343
tools = json.load(f)
4444

4545
# codename and ROM are undefined only when the Docker/Podman image is being prepared
4646
if self.codename and self.base:
4747

48-
with open(dcfg.root / "builder" / "manifests" / "devices.json", encoding="utf-8") as f:
48+
with open(dcfg.root / "zkb" / "manifests" / "devices.json", encoding="utf-8") as f:
4949
data = json.load(f)
5050
# load data only for the required codename + linux kernel version combination
5151
try:

0 commit comments

Comments
 (0)