mkbootimg from osm0sis changed the filename of the dtb section in [1]
which breaks the detection of qcdt in pmbootstrap.
Fix this by adjusting the filename pmbootstrap checks to match the
unpackbootimg behavior.
[1] https://github.com/osm0sis/mkbootimg/commit/d8222a4d
Currently, building with envkernel.sh entirely ignores the
makedepends listed in the kernel APKBUILD. Common dependencies
needed by most kernels are hardcoded in envkernel.sh.
However, some kernels may need extra dependencies either during
the build process or when the kernel is packaged.
Installing the makedepends when the build environment is initialized
is difficult because "source helpers/envkernel.sh" is not aware
of the exact kernel package that is going to be built later.
However, we can easily modify the packaging step
(i.e. pmbootstrap build --envkernel linux-...)
to install the required makedepends.
This fixes building "linux-postmarketos-qcom-msm8916" using envkernel,
since it requires "dtbTool" and "installkernel" to be installed when
the APKBUILD package() function is executed.
The sparse image tools (simg2img, img2simg, append2simg) are now
part of Alpine's android-tools where they are continously updated.
(See https://github.com/nmeum/android-tools/pull/8)
Therefore, "libsparse" now conflicts with "android-tools", which
causes the fastboot flasher to fail if "libsparse" is already
installed.
Install "android-tools" instead of "libsparse" before generating
a sparse image to avoid this problem.
Make it more obvious that we are generating packages during
'pmbootstrap init', when using the new device wizard:
[22:32:32] *** pmaport generated: /home/user/.local/var/pmbootstrap/cache_git/pmaports/device/device-openphoenux-neo900
[22:32:32] *** pmaport generated: /home/user/.local/var/pmbootstrap/cache_git/pmaports/device/linux-openphoenux-neo900
This file is used by the package browser frontend build by the alpine
developers. It uses the contents of the DESCRIPTION file to validate the
cache in the database.
Remove the recursive check, as it caused an infinite loop. It took a
very long time to complete anyway, even when it worked. The reasoning
for having the recursive check in the first place was, that we would
have device packages with arch=noarch set in the APKBUILD, but which
could only be built for a certain architecture (the device
architecture). Nowadays using arch=noarch in device packages is
forbidden, and we enforce that rule [1]. So the recursive arch check
isn't necessary anymore.
[1] ac6c0a2997
This reverts commit 6fb5b28e2f.
The -i option was removed from fastboot, so we can't use it anymore
unless we fork the package. There was only one device using it,
amazon-thor. I will add a note to the wiki page.
Fixes#1830.
Linking big libraries may take more than five minutes, so change the
default timeout to fifteen minutes to save users from frustration.
This is the same value that I'm using to build binary packages for the
repository.
Pushing directly to master without making a merge request, because this
is a trivial change.
Make sure, that "args.fork_alpine" is always present. Otherwise,
pmbootstrap will fail if the aportgen code is called by anything but
"pmbootstrap aportgen". For example, when the user is adding a new
device during "pmbootstrap init".
Fixes: 54e51759ad ("aportgen: add feature to fork upstream packages")
The important part about this patch is the change for armhf, which
adjusts the hostspec to the one used by Alpine.
Fixes a part of postmarketOS/pmaports#363
This MR add the --fork-alpine argument to the pmboostrap aportgen
command, which downloads the APKBUILD and related files and copies them
into the pmaports/temp folder.
At the moment, attempting to install to SD card when
flash_sparse is set to "true" will always fail because
/home/pmos/rootfs does not exist in that case.
Sparse images are only useful to speed up Fastboot flashing.
Nothing will be able to read it from the SD card.
The problem can therefore be avoided by simply skipping the
generation of the sparse image when SD card installation is used.
Remove u-boot from the native_cross_compile list as we now have
crossdirect. Compiling is not terribly slow anymore, and when not using
the "native" method, it is possible to depend on firmware packages like
arm-trusted-firmware-sun50i.
This reverts commit d7d7ccb672.
This allows for example for me to call the kconfig check function on the
.config file in my Linux tree: $ pmbootstrap kconfig check --file
.config and it reports me which kconfig options I need to enable.
From https://docs.python.org/3/library/re.html
"Backslashes are not handled in any special way
in a string literal prefixed with 'r'."
Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Properly handle the following two cases in APKBUILDs:
* depends="$depends ..."
* depends="${depends} ..."
First I've attempted to refactor the parsing code to do this in a more
generic way. But I've realized that it would make more sense to retire
the python based APKBUILD parsing approach altogether and finally use a
shell script parser. Let's discuss this in #1801.
Be more patient with waiting for processes to start up. From looking at
the logs, it seems that the only reason CI was failing is because we did
not wait long enough.
Add check for UEVENT_HELPER for kernels >= 4.0.0. Change LBDAF check to
be only required for kernels <5.2.0. Adjust the config format and
checking code to support such range specific checks.
Compare a version against a check string. This will be used in
"pmbootstrap kconfig check", to only require certain options if the
pkgver is in a specified range.
This fixes regression from commits 0431a519 and 4daf9916.
pmbootstrap kconfig_edit raised an error while trying to checksum a package.
Error was:
(028793) [16:13:22] ERROR: 'module' object is not callable
(028793) [16:13:22] See also: <https://postmarketos.org/troubleshooting>
(028793) [16:13:22] Traceback (most recent call last):
File "/home/lexx/dev/pmos/pmbootstrap/pmb/__init__.py", line 63, in main
getattr(frontend, args.action)(args)
File "/home/lexx/dev/pmos/pmbootstrap/pmb/helpers/frontend.py", line 279, in kconfig
pmb.build.menuconfig(args, args.package)
File "/home/lexx/dev/pmos/pmbootstrap/pmb/build/menuconfig.py", line 158, in menuconfig
pmb.build.checksum(args, pkgname)
TypeError: 'module' object is not callable
The function was renamed, call new function.
(Some?) Mediatek kernels don't have the kernel in the top-level
directory but in a subdirectory called 'kernel' next to a folder
'mediatek' containing most device-specific code.
Adjust the menuconfig code to be able to work with that.
Download all sources and verify their checksums.
This will be used in pmaports.git CI, if ci:skip-build is set in the
commit message (currently it just skips the build, and we don't test if
the source checksums are valid or not).
The armhf hostspec triplet has changed during the Alpine 3.6 release
cylcle. It was recently adjusted in abuild's arch_to_hostspec()
function [1]. Cross compilers in postmarketOS that were built with a
previous version of abuild still have the old hostspec in the name.
Since we use the same function in envkernel.sh to get the cross compiler
name, it is currently failing here for armhf.
We can't simply bump the pkgrel to force a rebuild, because that would
make them go out of sync with the upstrem (non-cross) compiler packages.
That would break the workflow for fixing incompatibilities with Alpine
(see [2]).
Add a workaround to envkernel.sh, to detect if the installed armhf cross
compiler binaries still have the old name.
[1] https://github.com/alpinelinux/abuild/pull/56
[2] https://wiki.postmarketos.org/wiki/Repository_maintenance
The qemu test executes a pmbootstrap instance with
pmb.helpers.run.user(). Use the --details-to-stdout flag from now on for
the started pmbootstrap process, so it is not silent when downloading
packages with apk, and will therefore not run into the timeout of the
parent process (which kills processes that are silent for more than five
minutes by default).
This fixes the test in our CI infrastructure.