Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • postmarketOS/pmbootstrap
  • fossdd/pmbootstrap
  • Adrian/pmbootstrap
  • JustSoup321/pmbootstrap
  • longnoserob/pmbootstrap
  • sixthkrum/pmbootstrap
  • ollieparanoid/pmbootstrap
  • magdesign/pmbootstrap
  • anjandev/pmbootstrap
  • HenriDellal/pmbootstrap
  • Minecrell/pmbootstrap
  • chipiguay/pmbootstrap
  • ijiki16/pmbootstrap
  • whynothugo/pmbootstrap
  • amessier/pmbootstrap
  • Eisenbahnfan/pmbootstrap
  • user0-07161/pmbootstrap
  • SzczurekYT/pmbootstrap
  • neuschaefer/pmbootstrap
  • knuxify/pmbootstrap
  • Frieder.Hannenheim/pmbootstrap
  • tgirl/pmbootstrap
22 results
Show changes
Commits on Source (2)
......@@ -119,6 +119,20 @@ def modify_apkbuild(pkgname: str, aport: Path) -> None:
pmb.aportgen.core.rewrite(pkgname, apkbuild_path, fields=fields)
def overmount_makefile(context: Context, kbuild_out: str) -> None:
makefile = context.config.work / "tmp_kernel.mk"
makefile.open("w").write("""
# Automatically generated by pmbootstrap to use relative include paths
include ../Makefile
""")
makefile_target = Chroot.native() / "mnt/linux" / kbuild_out / "Makefile"
logging.info("Overmounting Makefile to use relative include paths")
if not pmb.helpers.mount.ismount(makefile_target):
pmb.helpers.mount.bind_file(makefile, makefile_target)
def run_abuild(
context: Context, pkgname: str, arch: Arch, apkbuild_path: Path, kbuild_out: str
) -> None:
......@@ -141,6 +155,9 @@ def run_abuild(
pmb.helpers.mount.bind(Path("."), chroot / "mnt/linux")
if kbuild_out:
overmount_makefile(context, kbuild_out)
if not os.path.exists(chroot / kbuild_out_source):
raise RuntimeError(
"No '.output' dir found in your kernel source dir. "
......@@ -180,7 +197,7 @@ def run_abuild(
)
# Create symlink from abuild working directory to envkernel build directory
pmb.chroot.root(["ln", "-sf", "/mnt/linux", build_path / "src"])
pmb.chroot.root(["ln", "-sf", kbuild_out_source, build_path / "src"])
cmd: list[PathString] = ["cp", apkbuild_path, chroot / build_path / "APKBUILD"]
pmb.helpers.run.root(cmd)
......@@ -226,6 +243,10 @@ def package_kernel(args: PmbArgs) -> None:
else:
function_body = pmb.parse.function_body(aport / "APKBUILD", "package")
kbuild_out = find_kbuild_output_dir(function_body)
if not kbuild_out:
kbuild_out = ".output"
chroot = pmb.build.autodetect.chroot(apkbuild, arch)
# Install package dependencies
......