Commit Graph

930 Commits

Author SHA1 Message Date
Oliver Smith 937686d164
Don't mark all packages as explicitly installed (#1247)
pmbootstrap does dependency resolving on its own, and passes the list
of resolved packages to apk when we want it to install something. The
reason was outlined in #129:

> fixing #120: packages do not get updated in "pmbootstrap install"
> after they have been rebuilt. For this to work, we specify all
> packages explicitly for abuild, instead of letting abuild do the
> resolving.

This new PR fixes #1212 (which noted that all of these dependencies
were explicitly marked for installation) by doing the following:
1. All packages and dependencies get attached to the virtual package
  .pmbootstrap instead of world
2. We install the packages (without depends) explcitly
3. .pmbootstrap gets removed, which means that all packages from 1.
  stay installed, but are no longer marked as explicitly installed.
  They will get removed automatically, when the depending packages get
  removed.

In addition, the mechanism for replacing the package of locally built
packages with their full path, was broken and has been fixed in this
commit. This is necessary to update packages of the same version with
apk.
2018-02-25 20:49:47 +00:00
Luca Weiss 6b9e7ecf75 qemu: allow the user to specify the kernel flavor (#1256) 2018-02-25 19:20:22 +00:00
Oliver Smith 948b5af09b
device packages: depend on postmarketos-base (#1258)
* device-*: add postmarketos-base to depends
* aportgen: add postmarketos-base to depends
* Add test case
* postmarketos-base: Don't depend on devicepkg
* msm-fb-refresher: Enable service in post-install
2018-02-25 18:40:54 +00:00
Pierre Rudloff 26f0e2d045 infocus-flatfish: Correct framebuffer mode (#1262) 2018-02-25 17:47:04 +00:00
Attila Szöllősi e4875e54fa Fix menuconfig arch check (#1259)
We don't use 'arch="all"' in our kernels anymore (that does not make sense,
since each arch needs its own kernel config). This patch fixes the menuconfig
code to work with multiple values in the "arch" field.
2018-02-25 17:44:01 +00:00
Joey Hewitt cd8b190bc3 samsung-i9195: fix kernel config (#1260)
It lacked some hardware config, such as the USB switch.
With this change, I was able to SSH over the USB network.

I based this off of LineageOS 14.1's config file from its
build root. I think we were missing the secondary config
file
(TARGET_KERNEL_VARIANT_CONFIG := msm8930_serrano_eur_lte_defconfig
in BoardConfig.mk).
2018-02-25 17:32:35 +00:00
Oliver Smith ad5a0d4294
Make proprietary drivers optional (1/2): pmbootstrap changes (#1254)
Here are the changes necessary in pmbootstrap to make proprietary
software installed onto the device (firmware and userspace drivers)
optional (#756). To full close the issue, we need to apply this concept
to all device packages we already have in a follow-up PR.

Changes:
* New config file options nonfree_firmware and nonfree_userland, which
  we ask for during "pmbootstrap init" if there are non-free components
  for the selected device.
* We find that out by checking the APKBUILD's subpakages: The non-free
  packages are called $pkgname-nonfree-firmware and
  $pkgname-nonfree-userland.
* During "pmbootstrap init" we also show the pkgdesc of these
  subpackages. Parsing that is implemented in
  pmb.parse._apkbuild.subpkgdesc(). It was not implemented as part of
  the regular APKBUILD parsing, as this would need a change in the
  output format, and it is a lot *less* code if done like in this
  commit.
* pmb/parse/apkbuild.py was renamed to _apkbuild.py, and
  pmb/install/install.py to _install.py: needed to call the function in
  the usual way (e.g. pmb.parse.apkbuild()) but still being able to
  test the individual functions from these files in the test suite.
  We did the same thing for pmb/build/_package.py already.
* Install: New function get_nonfree_packages() returns the non-free
  packages that will be installed, based on the user's choice in
  "pmbootstrap init" and on the subpackages the device has.
* Added test cases and test data (APKBUILDs) for all new code,
  refactored test/test_questions.py to have multiple functions for
  testing the various questions / question types from
  "pmbootstrap init" instead of having it all in one big function.
  This allows to use another aport folder for testing the new
  non-free related questions in init.
2018-02-24 21:49:10 +00:00
Bart Ribbers 2e30fa4281 New device (Jolla Phone) (#1245) 2018-02-24 18:46:54 +00:00
Luca Weiss 2f78dad318 Kernel updates (#1253)
* linux-postmarketos-lts 4.14.21
* linux-postmarketos-stable 4.15.5
2018-02-24 08:34:42 +00:00
MoreRobustThanYou b661fd957f Patch amazon-thor's kernel to properly set the RGB mode (#1252) 2018-02-24 08:25:32 +00:00
Pierre Rudloff 64c8f39e82 New device: infocus-flatfish (#1251)
It boots and display/touchscreen partially work
(the framebuffer only fills a part of the screen).
2018-02-24 08:17:38 +00:00
Oliver Smith 8f5ffe0589
APKINDEX not found: Only show in verbose log (#1250)
The message appears 20 or so times in a row when setting up a new
chroot. Right now we log it into the debug log (which is what
"pmbootstrap log" and "pmbootstrap --details-to-stdout" show). This
is annoying for normal pmbootstrap usage, and really clutters up the
Travis output.

This commit changes the log level to verbose, so it only shows up
when "-v" is passed to pmbootstrap.
2018-02-24 08:03:34 +00:00
Pierre Rudloff 5514584f71 gp-peak: Add support for osk-sdl and audio (#1243)
* gp-peak: Add support for osk-sdl
* gp-peak: Move non-kernel files to device-gp-peak
* gp-peak: Add audio support
Manually trigger the udev rules for audio devices and add the default user to the audio group
2018-02-22 23:36:24 +00:00
Oliver Smith 68c3be8f55
Update musl-* to upstream (1.1.19-r0) 2018-02-22 23:44:37 +01:00
Mayeul Cantan a261a1cd26 Add a maximum-attention hook to help with debugging boot issues (#1238)
The hook flashes every LED it can find, as well as the vibration motor.
More paths are probably necessary to support more devices and kernels.
2018-02-22 22:10:19 +00:00
Sicelo 730d311e75 Update README.md (#1249)
x86 is also supported, not just x86_64
2018-02-22 22:50:39 +01:00
Pierre Rudloff 40d8955bae gp-peak: Set deviceinfo_flash_fastboot_max_size (#1244) 2018-02-21 20:39:59 +00:00
Luca Weiss c7db649823 Kernel updates (#1240)
* linux-postmarketos-mainline 4.16-rc2
* linux-postmarketos-stable 4.15.4
* linux-postmarketos-lts 4.14.20
2018-02-21 19:19:37 +00:00
Oliver Smith 9af240b7d9
Bump musl-* to upstream (1.1.18-r8) 2018-02-21 19:46:06 +01:00
Oliver Smith 90ca7b6351
zap_mismatch_bins: Adjust to new apkindex parsing
Without this fix, `pmbootstrap zap -m` fails with:

  File "/home/user/code/pmbootstrap/pmb/__init__.py", line 61, in main
    getattr(frontend, args.action)(args)
  File "/home/user/code/pmbootstrap/pmb/helpers/frontend.py", line 322, in zap
    distfiles=args.distfiles)
  File "/home/user/code/pmbootstrap/pmb/chroot/zap.py", line 54, in zap
    zap_mismatch_bins(args, confirm, dry)
  File "/home/user/code/pmbootstrap/pmb/chroot/zap.py", line 110, in zap_mismatch_bins
    if pkgname != bin_data["pkgname"]:
KeyError: 'pkgname'
2018-02-20 21:41:03 +00:00
Bart Ribbers a3676b1bbc New device: Nexus 5X (LG Bullhead) (#1222) 2018-02-20 20:24:45 +00:00
Oliver Smith 2a9c1da46c
Bump version to 0.7.0 (previous one got tagged) 2018-02-20 19:53:50 +00:00
Oliver Smith db5e69630e
Index parser: support multiple package providers (#1202)
* The APKINDEX parser used to return a dictionary with one package for
  a given package name. This works for the installed packages database,
  because there can only be one provider for a package. But when
  parsing packages from binary repositories, we need to support
  multiple providers for one package. It is now possible to get a
  dictionary with either multiple providers, or just a single provider
  for each package.
* Dependency parsing logic has been adjusted, to support multiple
  providers. For multiple providers, the one with the same package
  name as the package we are looking up is prefered. If there is none
  (eg. "so:libEGL.so.1" is provided by "mesa-egl"), it prefers packages
  that will be installed anyway, and after that packages that are
  already installed. When all else fails, it just picks the first one
  and prints a note in the "pmbootstrap log".
* Added testcases for all functions in pmb.parse.apkindex and
  pmb.parse.depends
* pmbootstrap chroot has a new "--add" parameter to specify packages
  that pmbootstrap should build if neccessary, and install in the
  chroot. This can be used to quickly test the depencency resolution
  of pmbootstrap without doing a full "pmbootstrap install".

Fixes #1122.
2018-02-20 19:52:28 +00:00
Martijn Braam 481c99f50c
postmarketos-ui-i3wm (#1225)
* Added a ui package for i3wm

* Added n900 specific i3wm config

* Fixed mixed tabs and spaces in i3status.

This is also the first commit made on an n900
running postmarketOS.

* Removed redundant X11

* Use lock.sh to lock the device

* Windows management improvements

* bump pkgver

* Fix device-nokia-n900 checksums

* Fixed path in the i3wm split package
2018-02-20 11:21:03 +01:00
Oliver Smith 0f371e426f
pmbootstrap build --src: override source for any package (#1210)
* New "pmbootstrap build --src=/local/source/path hello-world" syntax
* The local source path gets mounted inside the chroot
* From there, a copy of the source code gets created with rsync (so
  we can write into the source folder if necessary, for better
  compatibility with all kinds of APKBUILDs)
* After the aport gets copied into the chroot before building (as
  usually), we extend the APKBUILD with overrides to make it use
  mountpoint's source instead of downloading the package's source
  from the web as usually
* The package built with the local source gets _pYYYYMMDDHHMMSS
  appended to the pkgver
* linux-postmarketos-mainline: use $builddir, fix patch checksum
2018-02-19 22:04:01 +00:00
Oliver Smith 42ed5dcb0a
linux-nokia-n9: update patch checksum 2018-02-19 21:04:52 +01:00
Oliver Smith eaeb3c9f2c
kfilemetadata: bump pkgrel (soname bump: libexiv2.so.14) 2018-02-19 20:59:00 +01:00
Martijn Braam 0d84d58ba7 Wireguard for postmarketos-stable (#1231)
* Added modified wireguard APKBUILD from alpine
* Add required kernel options to postmarketos-stable
2018-02-19 16:51:00 +00:00
Pierre Rudloff 2fb49d2a15 gp-peak: display and touch screen (#1226)
Adds a /etc/local.d/ script in order to work around
udev being broken with this kernel.
2018-02-18 01:42:46 +00:00
Alex Dills 50a5d36cbb Rudimentary ZSH autocompletion helper (#1232) 2018-02-17 22:46:20 +00:00
Alexander 57b45a4798 Add a check for binfmt_misc (#1236)
Closes #1223.
2018-02-17 20:41:54 +00:00
Oliver Smith 886d19620e
linux-*: Don't depend on postmarketos-mkinitfs
Binary packages are rebuilding. If your kernel is not rebuilt yet, and
you don't want to build it yourself, just checkout the previous
pmbootstrap commit.

This commit also changes the arch from the postmarketOS kernels from
"all" to the ones where we actually have a kernel config.

Fixes #1229.
2018-02-17 18:26:31 +01:00
Alexander 3d35b45835 Check kernel config options based on the architecture (#1233)
The 'necessary_kconfig_options' dictionary in pmb/config/__init__.py
now has the different architectures (space separated) as the keys and
the dictionary, which matches kernel config options and their
expected value, as its value.
For that purpose, the 'check' function in pmb/parse/kconfig.py was
modified, so that it takes the architecture from the kconfig filename
and uses it to find the needed kernel config options.
Closes #1218.
2018-02-17 13:37:35 +00:00
Oliver Smith d261034349 Package kernel-scripts separately (#1234)
We have two methods of cross-compiling:
* native: everything runs with the host architecture, QEMU is not
  involved. This is the fastest, but requires the build system to be
  working with it. We use this for all linux-* packages currently.
* distcc: everything runs through QEMU emulating the target arch,
  *except* for the compiler. This is the most compatible approach
  working with all packages.

When compiling `linux-*` packages natively, kernel scripts needed
during the build process get generated. Some of these are C files that
get compiled as executables. In native mode, these get compied to the
native architecture, in distcc mode to the target architecture.

The problem is, that we need these scripts compiled for the target
architecture in the kernel's dev package in order to compile kernel
modules outside of the kernel's package (e.g. wireguard).

It is not possible to just rewrite this logic to generate target-arch
binaries when running in native mode, because these binaries require
musl-dev, linux-headers and some other packages to be installed for the
target architecture inside the native chroot.

We solve this by introducing a new `kernel-scripts` package. which
contains just the binary scripts. In case the dev package was
cross-compiled, it depends on `kernel-scripts` and symlinks these
binaries. The `kernel-scripts` package always gets compiled in distcc
mode since it does not have a `linux-` prefix.

Fixes #1230.
2018-02-16 22:00:37 +01:00
Oliver Smith 7c49ce32d4 Various linux packages: Fix broken dev subpackage (#1228)
Fixes #1227.
This also updates the hash in linux-postmarketos-mainline, because the
hash changed upstream (they updated their git version server-side?).
2018-02-15 00:20:40 +01:00
Oliver Smith ceac21766f
check_checksums.py: Non-zero exit on build error
Fixes #1124.
2018-02-14 00:12:46 +01:00
Pierre Rudloff 42fadee584 New gp-peak device (Geeksphone Peak) (#1214)
It boots and SSH works but the screen stays black.
2018-02-12 20:03:35 +00:00
Michael Hamann 80ab996161 New device: Samsung Galaxy Note 8.0 (WiFi) n5110 (#1219)
This port includes:
* Weston including touch and WiFi (using e.g. firmware-samsung-i9305) works.
* Touchscreen calibration for osk-sdl
* Sound configuration
* Udev rules for touch and pen, pen works!
2018-02-12 19:20:49 +00:00
Oliver Smith 57afbda3b9
Bump version to 0.6.0 2018-02-11 12:36:47 +01:00
Lucas Ramage 42018f8014 mkbootimg: replace Python version with osm0sis' C version (#1193)
Closes #441. Adjust bootimg_analyze code:
* Install mkbootimg (which now provides unpackbootimg) instead of
  unpackbootimg. In theory, pmbootstrap should recognize this
  automatically, however right now it does not yet handle this case.
* The file names of the extracted files have changed.
2018-02-11 11:41:41 +00:00
Michael Hamann c038566fef devicepkg-dev: Generate calibration matrix for libinput (#1205)
* Automatically generate a calibration matrix for libinput
  This takes the calibration matrix for wayland and divides the pixel
  offsets by the device width/height.
* Bump pkgrels of devices using devicepkg-dev
  This causes new packages to be generated, using the new devicepkg-dev
  version.
2018-02-11 10:20:31 +00:00
alive4ever e771de619d Add triggerhappy: HID input device handler (#1211)
More information:
<https://wiki.postmarketos.org/wiki/Troubleshooting:HID_buttons>
2018-02-11 10:09:18 +00:00
Oliver Smith fc4d89a0ec
Update musl-* to upstream (1.1.18-r7) 2018-02-10 19:07:17 +01:00
Pavel Machek bca7fc2099 Update unicsy-demo to 0.4.6 (#1215) 2018-02-09 20:41:15 +00:00
Oliver Smith 3fe75ddb56
Fix screwed up progress bars in Travis output (#1213)
Right now, they appear on screen when using --details-to-stdout. This
does not work well with Travis CI and screws up the log.

Disabling the progress bars in abuild works just like Alpine does it in
their Travis CI script: Exporting SUDO_APK as
"abuild-apk --no-progress" instead of "abuild-apk".

test_check_checksums.py: Run "pmbootstrap build_init" before building
any packages, so it is a bit less verbose (downloading the APKINDEX
files etc.). Later we run the build init code again (because we use
--strict while building the packages), but then the APKINDEX files
are already present. So overall the log is a bit shorter before the
building starts. (It is still logged to the logfile, which gets
printed on error anyway.)
2018-02-09 18:43:58 +00:00
Bart Ribbers c232c98851 Update Plasma to 5.12 (#1208) 2018-02-06 23:18:45 +00:00
Oliver Smith bd4ebb3473
gitignore: Add pytest cache 2018-02-06 23:10:25 +01:00
Daniele Debernardi 7b01e973e1 [fbdebug] Add panning functionality (#1207) 2018-02-06 21:21:25 +00:00
alive4ever d0acbca4f2 Initial porting effort to Xiaomi Redmi 1S (armani) (#1204)
The device is Xiaomi Redmi 1S, based on MSM8296 platform, with Qualcomm
Snapdragon 400.  The kernel is from lineageOS (3.4.0). Some additional patches
are needed for successful compilation. The screen dimension is 720x1280.

The touchscreen device name is ft5x06_i2c. Use this name for udev
instead of hardcoded device path. Also add a workaround for red
screen weston by setting weston_pixman to 2
The screen doesn't refresh. Enabling msm-fb-refresher as suggested.

Add udev rule to indicate whether the device is in charging state.
Green led indicates that the device is charging, whereas red light
indicates that the device is discharging.

For prima wlan module to work, an initialization procedure is needed (
echo 1 > /dev/wcnss_wlan ), before loading the prima wlan module
(wlan.ko). Also build the prima wlan as module. 

Xiaomi Redmi 1S is using pronto wlan module, which needs some firmware
to run. Add the required wifi firmware to enable the wifi interface.

Add an openrc service to load wlan module after wcnss_service is
initialized.
2018-02-05 19:58:08 +00:00
Daniele Debernardi 16a4ce10c8 fbdebug: Add initial framebuffer debug tool (#1196) 2018-02-03 19:09:59 +00:00