Commit Graph

401 Commits

Author SHA1 Message Date
Pablo Castellano 401c29af76 Close #326: Implement command to retrieve and set configuration values (#359)
* Implement command to retrieve and set configuration values
* qemu: show advice to use "pmbootstrap config"
* Allow "pmbootstrap config" without positional arguments (prints the full config)
* Check valid variable names
2017-08-14 14:25:28 +00:00
Pablo Castellano ab1bcd2e6f contributing: fixed typos and added some links (#372) 2017-08-14 14:23:35 +00:00
drebrez 3ea15dca1a Rename wrong `deviceinfo_flash_cmdline` to `deviceinfo_kernel_cmdline` (#369) 2017-08-14 14:22:38 +00:00
clayton craft 9e2a8e3af6 [linux-postmarketos] Update to linux-4.12.6 (#371) 2017-08-14 16:16:36 +02:00
clayton craft 49fd9e0e4e [RX51] misc improvements (#287)
* [RX51] enable hwdrivers service to 'fix' acpid

* [RX51] set rtc device for hwclock service

* [RX51] Enable networking service, add /etc/network/interfaces

* [RX51] Update APKBUILD checksums & pkgrel
2017-08-14 14:19:22 +02:00
Oliver Smith 600e4ee7d5 Update CONTRIBUTING.md (#368) 2017-08-12 16:23:48 +00:00
Oliver Smith c904ffc751 Make gcc-aarch64 reproducible (#366)
This fixes https://github.com/postmarketOS/binary-package-repo/issues/1

GCC generates hardlinks between files `A` and `B` in its `make install` step. The problem is, that `tar` randomly packages `A` as full binary, and links `B` to `A`, or the other way around! I was able to reproduce this issue consistently when re-building `gcc-aarch64` on Travis CI (interestingly, this did not appear for `gcc-armhf`).

The fix is, to delete `B` and create a symlink `B` that points to `A` instead.
2017-08-12 14:06:02 +00:00
Oliver Smith f3f21d3152 Fix #342: don't use distutils.version.LooseVersion anymore (#364)
Previously, distutils.version.LooseVersion was used, because it was
sort of close enough to how Alpine parses versions.

This new version uses the exact same algorithm, as `apk` does, and
it passes *all* of `apk`'s testcases for version checking (previously
we simply skipped the ones, that did not pass).

* Remove pmb/helpers/version.py left-over (it is in parse now)
* Make asserts consistent, do not use unnecessary parenthesis
2017-08-12 14:03:40 +00:00
opendata26 aaaceff297 Add Xperia Z2 Tablet WiFi (#339)
* Add Xperia Z2 Tablet WiFi config

* Various fixes for Z2 tablet

* Fix Checksums
2017-08-11 12:41:29 +02:00
Pablo Castellano 8d358837ee Minor fixes (#360)
* aports: Use $install variable inside $source

So these files also get fingerprinted

* qemu: Use shutil.which instead of pmb.helpers.run.user

* Fix typo in comment
2017-08-10 23:58:28 +00:00
Oliver Smith 9652e4ce27
Update busybox-static-* to upstream 2017-08-10 00:52:28 +02:00
PureTryOut 0a9ab230aa Fix usb networking on the Sony Amami (#357) 2017-08-09 21:54:01 +00:00
Yuval Adam b06a55f4a3 Initial support for mozilla flame (#356)
* Initial Mozilla Flame packages

* Update dtbtool to use LineageOS upstream

* Use mkbootimg --dt flag only when deviceinfo_bootimg_qcdt is defined

* Update mkbootimg to use LineageOS upstream

* Add sparse image flashing on device-mozilla-flame

* Only support SD card install on Mozilla Flame

* Remove useless profile.sh on mozilla flame

* Package DTBs in /usr/lib/linux-mozilla-flame/

* Build and install modules in linux-mozilla-flame
2017-08-09 20:57:52 +00:00
Oliver Smith f829d0fe03 Configfs network setup was broken (related to #338) (#353)
* Partially resolve #338: Configfs network setup was broken
* Ignore shellcheck warning
...because if we do what shellcheck recommends here, we end up with
exactly the code which we're reverting in this PR.
2017-08-09 20:30:41 +00:00
Pablo Castellano 49b35ad32d Close #226: Launch postmarketOS in a qemu virtual machine (#350)
Thanks to Pablo Castellano and Martijn Braam!
In postmarketOS we are now able to generate system images with the
correct configuration so that they can boot already using qemu

This commit brings the `pmbootstrap qemu` action.
This command is very handy because you don't have to set all the
qemu parameters, pmbootstrap does it for you.

* device-qemu-vexpress: Added kernel command line according to wiki
* qemu: Added workaround for image writing permissions
* qemu: Added support to launch postmarketOS in a QEMU virtual machine

- Support for emulating these architectures in QEMU: arm, aarch64, x86_84
- Generate QEMU command correctly depending no guest architecture (arm/x86)
- Run QEMU in the same architecture as the host by default
- Refactoring in pmb.parse.arch and pmb.qemu.run
- Raise exception if DTB file or system image are not present
- Display more useful information when something fails (e.g. image not found)
- Run qemu version depending on arch (host or argument), not device configured

* device-qemu-amd64: set deviceinfo_kernel_cmdline to "PMOS_NO_OUTPUT_REDIRECT"
* qemu: added --memory argument to specific guest RAM
* device-qemu-amd64: adjusted deviceinfo_kernel_cmdline (console=tty1)
* Added /etc/network/interfaces for qemu-amd64
* qemu: Added KVM support if /dev/kvm if present
* Specify separate machines for architecture
* qemu: Check if QEMU is installed instead of crashing
* Added graphics driver to qemu-aarch64

- Use arm (as used in qemu) instead of armhf (used in Alpine)
- qemu argument is -dtb
- Follow same style to build the command + arguments

* qemu: Added SSH port redirection: ./pmbootstrap.py qemu -p 2222
2017-08-09 20:26:40 +00:00
drebrez 96cb52847d Increase minimal system image size by 15% to have some free space (#336) 2017-08-09 19:16:04 +00:00
Oliver Smith 21c09b3b3c Fix various build issues (fix #189, fix #341) (#345)
Changes:
* Removed the apkindex_files cache. That particular cache caused
  bug #189 and didn't bring any real-world performance improvements
  (tested 3x with that cache and 3x without, no significant speed
  difference). I decided to remove it instead of keeping it/adding
  even more code to resolve the bug.
* Fix the check for already built packages: always use the architecture,
  that the package should be built for instead of the architecture of
  the build environment (e.g. use armhf, even when building a noarch
  package in the x86_64 chroot). This partially resolves #341.
* Make pmb.chroot.apk.install_is_necessary() more robust: If the binary
  package is missing, although it should be there, print a warning and
  build it with force.
2017-08-09 17:59:21 +00:00
Martijn Braam 035e3807b5 Fix the checksum on the n900 device package (#352) 2017-08-09 14:25:48 +02:00
Attila Szöllősi 4b8a5a6bb6 Fix refresh rate on sony-amami (#348)
Patch added to hardcode pixclock in framebuffer driver
2017-08-08 16:50:11 +00:00
Oliver Smith ae64894278
Fix #349: Verify pkgname against folder name after replacing vars
This fixes a regression introduced in 7fe2bc18c3.
Sorry for the inconvenience!
2017-08-08 15:03:17 +02:00
Oliver Smith 7fe2bc18c3 Close #334: Check if pkgname is the aport folder name (#347)
...and remove an redundant sentence with broken grammar in another
error message.
2017-08-07 22:53:54 +00:00
Attila Szöllősi ceda097655 Fix weston on sony-amami (#340) 2017-08-07 19:08:35 +00:00
drebrez 257666799e Add `-c, --clear` argument for `log` and `log_distccd` actions to clear log files (#344) 2017-08-07 18:56:35 +00:00
Oliver Smith 6a129669a3 Fix 'install: can't stat' message, when no hook is installed (#310) 2017-08-06 13:12:43 +00:00
Pablo Castellano b41e75e662 Minor fixes (#316)
* Fixed typo and specify list order

* Simplify code for jobs default value
2017-08-06 12:50:38 +00:00
Oliver Smith 5eb9b92e7b Fix: gcc-armhf not reproducible (#64) (#333)
libstdc++.a from gcc-armhf was not reproducible on Travis (it was, when built locally!). These .a files are just archives of object files .o, and in this case it was caused by a random order of the .o files in the archive.

This PR patches the package() function of the APKBUILD when running pmbootstrap aportgen gcc-armhf (same for aarch64 of course), to extract all .a files, and repack them to be reproducible (by sorting the files before packing them).

As usually, we can still inherit everything from the upstream gcc aport from Alpine, and apply our changes on top of that.

Travis without the patch:
https://api.travis-ci.org/jobs/260402679/log.txt?deansi=true

> CHALLENGE FAILED for usr/armv6-alpine-linux-muslgnueabihf/lib/libstdc++.a:File 'usr/armv6-alpine-linux-muslgnueabihf/lib/libstdc++.a' is different!

Travis with the patch (I've instructed Travis to run off this branch to test it):
https://api.travis-ci.org/jobs/260806203/log.txt?deansi=true

> Done. Your build exited with 0.
2017-08-04 20:38:27 +00:00
PureTryOut 34e2f8093c Removed consolekit2 (upstreamed) / other plasma fixes (#331)
* Removed consolekit2 from the repo as it's now upstreamed

* Add missing makedepend to kwin
2017-08-04 15:09:01 +00:00
Martijn Braam d12ca0db86 Fixed checksum on travis for removed packages (#332)
* Add check for removed packages

* Change for testing travis

* Fixed package depth
2017-08-04 14:52:24 +00:00
Oliver Smith de9f6a59b9
Update busybox-static-* to upstream 2017-08-04 01:39:03 +02:00
Oliver Smith e4ffa6264a Package Plasma Mobile (All credit to PureTryOut!) (#284)
Plasma mobile compiles, but we didn't get it to run yet.
Thanks to PureTryOut for all this amazing porting work! \o/
2017-08-03 20:14:04 +00:00
Oliver Smith 742e4624e8 Fix #319: pmbootstrap menuconfig didn't work for mainline kernel (#328)
Also did some minor refactoring.
2017-08-03 16:11:23 +00:00
drebrez 147863d98a Automatically compute the minimum size for the partition and resize it during the boot process (#127)
* Automatically compute the minimum size for the partitions
* Automatically resize the pmOS_root partition during the boot process
* Resize root partition only if there is unallocated space at the end of the device.
* Added more echos to make debugging easier while looking at the pmOS_init.log.
* Updated static_code_analysis.sh script to run shellcheck with `-x` option.
2017-08-03 16:01:00 +00:00
Oliver Smith 1a87ee87d6
Update busybox-static-* to upstream 2017-08-03 02:22:28 +02:00
Oliver Smith 025d646e47 Close #314: Add --details-to-stdout parameter (#317)
When this parameter is set, `args.logfd` (the log file descriptor)
gets set to `sys.stdout`, so all logging gets directly sent to the
active pmbootstrap session, and not to a log file.

This will be used for Travis jobs, because they get killed after
10 minutes without any output (and builds may take longer).
2017-08-02 19:38:42 +00:00
clayton craft 6c368f8ced [linux-postmarketos] enable maint. patching of kernel source (close #311) (#313)
This enables applying maint. release patchsets to the kernel source
tarball, in line with Alpine Linux's linux-vanilla APKBUILD.
This addresses #311.
2017-08-02 16:48:06 +00:00
Pablo Castellano 0e4017105d Implement sparse system images (fix #299) (#303)
* Packaged libsparse

libsparse from the Android project provides multiple tools like img2simg
and simg2img.
These are used to split a large image for the system partition into
separate smaller chunks with sparse headers

This is required for several devices (at least bullhead, fp2 and titan)
because it fixes the "Invalid sparse file format at header magi" error

https://github.com/postmarketOS/pmbootstrap/issues/299

* Added new variable deviceinfo_flash_sparse (fixes #299)

Right after the system image is generated, pmbootstrap checks this
variable. In case it is true, run img2simg on it

* motorola-titan: enable deviceinfo_flash_sparse

* libsparse: use source from github: anestisb/android-simg2img

It is not that easy to use the upstream archive because everytime
you download it, the files have the current date as creation date
and that makes the file have a different checksum every download
https://github.com/postmarketOS/pmbootstrap/pull/303#issuecomment-319017197
2017-08-02 16:21:50 +00:00
Pablo Castellano d09129e60d Update musl-* to 1.1.16-r17 (#320) 2017-08-02 11:22:40 +00:00
Pablo Castellano 6a5a57c4bc Fix #223: Use `.tar.gz` instead of `.zip` for kernel sources (#315) 2017-08-01 15:57:52 +00:00
Pablo Castellano 8389448bfd init: Allow to specify extra packages that will be always installed to rootfs (#304) 2017-08-01 15:31:33 +00:00
clayton craft d6bf0009e7 [RX51] workaround lines issue (#309)
This works around the lines issue using a patch from Ti: https://lkml.org/lkml/2017/6/30/163
2017-07-31 21:25:45 +02:00
James Heald 0f00759fde Add device Samsung Galaxy Note 2 (N7100) (#293) 2017-07-31 18:02:44 +00:00
Martijn Braam 0188dd91a6 Travis checksum pr fix (#308)
* Check the correct branch in PR runs
2017-07-31 17:53:23 +00:00
Martijn Braam b3146532bb Fixed dtb installation with mainline kernel (#307)
* Fixed dtb installation with mainline kernel
2017-07-31 19:44:17 +02:00
Pablo Castellano e04797f93c Print "git diff" output when the checksums tests has failed (#306)
In some cases this output is useful to identify the root of the problem.
See https://github.com/postmarketOS/pmbootstrap/pull/303#issuecomment-319017197
2017-07-31 11:55:51 +02:00
Oliver Smith fe385cad6d Fix #300: Properly unset environment in chroot (#302) 2017-07-30 22:08:36 +00:00
Martijn Braam 61f35c080d Fix test script not crashing hard enough in travis (#301)
Made check_checksums.py exit 1 on errors
2017-07-30 21:54:47 +00:00
drebrez 6cb663eb6e Add possibility to export Odin flashable tar (#297)
Add possibility to export Odin flashable tar for devices where the
flasher method is heimdall-isorec or heimdall-bootimg
2017-07-30 21:15:59 +00:00
Martijn Braam c0a70cce3f Implemented checksum test in the travis script (#298)
* Implemented checksum test in the travis script
* Added workaround for squashed forced pushes
* Made test possible to run locally
* Match multiple git versions for the working directory message
2017-07-30 19:43:02 +00:00
Pablo Castellano 915da12dd1 Allow 'pmbootstrap menuconfig' without specifying "linux-" (#295)
We can allow both ways:
* pmbootstrap menuconfig linux-motorola-titan
* pmbootstrap menuconfig motorola-titan

The former will show a tip about the second
This also prevents users from running menuconfig on aports like
'device-motorola-titan' or 'mkbootimg'
2017-07-30 18:41:49 +00:00
Oliver Smith 26c8a94d4d
Fix checksum of postmarketos-base 2017-07-30 16:15:51 +02:00