Commit graph

37 commits

Author SHA1 Message Date
Oliver Smith
0921c2eaf1 Fix conflict with mkbootimg and android-tools (#1557)
Alpine ships `mkbootimg` with the `android-tools` package now. This
conflicts with the `mkbootimg` fork from osm0sis (see #441).

Changes:
* Rename `mkbootimg` to `mkbootimg-osm0sis` (aport and binary name)
* `mkbootimg-osm0sis`: provides `mkbootimg` now (so we don't need to
  change all the device aports), update version to 2018.05.10
* Adjust our `mkinitfs` script to call `mkbootimg-osm0sis`
* Better aport description
* pkgrel_bump testcase: don't fail on deleted aport
2018-06-17 21:26:34 +00:00
Mayeul Cantan
71010f6d73 Add charging mode detection for kylevess (#1526)
As documented here:
https://wiki.postmarketos.org/wiki/Samsung_Galaxy_Trend_lite_(s7390g)

This might be set on other devices as well. This patch also bumps
postmarketos-mkinitfs one minor version.
2018-06-01 12:36:05 +02:00
Oliver Smith
f5d5a9be19 msm-fb-refresher: use initfs hook (#1438)
The `msm-fb-refresher` updates the screen for msm based devices. It is
not needed for all devices, so we had some extra code in the initramfs,
that would only add it when the `deviceinfo_msm_refresher` variable was
set. However, we are able now to add files to initramfs hooks, so this
hack can be removed and simplify everything.

Changes:
* Remove `deviceinfo_msm_refresher` from all deviceinfos
* Add sanity check for it
* Move all `deviceinfo` sanity checks to an extra function
* `postmarketos-mkinitfs`: remove code for msm refresher
* `msm-fb-refresher`: add initramfs hook
2018-04-24 21:09:53 +00:00
Oliver Smith
63f921fbac pmbootstrap init: kernel selection / remove linux-pmos-lts (#1363)
* As discussed in IRC/matrix, we're removing `linux-postmarketos-lts`
  for now. The kernel isn't used right now, and we save lots of
  maintenance effort with not updating it every week or so.
* new config option `"kernel"` with possible values:
  `"downstream", "mainline", "stable"` (downstream is always
  `linux-$devicename`)
* ask for the kernel during `pmbootstrap init` if the device package
  has kernel subpackages and install it in `_install.py`
* postmarketos-mkinitfs: display note instead of exit with error when
  the `deviceinfo_dtb` file is missing (because we expect it to be
  missing for downstream kernels)
* device-sony-amami:
  * add kernel subpackages for downstream, mainline
  * set `deviceinfo_dtb`
* device-qemu-amd64: add kernel subpackages for stable, lts, mainline
* test cases and test data for new functions
* test case that checks all aports for right usage of the feature:
  * don't mix specifying kernels in depends *and* subpackages
  * 1 kernel in depends is maximum
  * kernel subpackages must have a valid name
  * Test if devices packages reference at least one kernel
* Remove `_build_device_depends_note()` which informs the user that
  `--ignore-depends` can be used with device packages to avoid building
  the kernel. The idea was to make the transition easier after a change
  we did months ago, and now the kernel doesn't always get built before
  building the device package so it's not relevant anymore.
* pmb/chroot/other.py:
  * Add autoinstall=True to kernel_flavors_installed(). When the flag
    is set, the function makes sure that at least one kernel for the
    device is installed.
  * Remove kernel_flavor_autodetect() function, wherever it was used,
    it has been replaced with kernel_flavors_installed()[0].
* pmb.helpers.frontend.py: remove code to install at least one kernel,
  kernel_flavors_installed() takes care of that now.
2018-04-03 23:50:09 +00:00
Daniele Debernardi
5f6afd3b39 Add additional files into initramfs when debug-shell is installed (#1358) 2018-03-26 18:12:58 +00:00
Daniele Debernardi
f614c9df88 Implement charging mode (#1285)
* Add charging-sdl package
* Include charging-sdl into the initramfs-extra
* [initramfs] Detect charging mode and use triggerhappy to start
charging-sdl when the power key is pressed
2018-03-05 22:59:23 +00:00
Oliver Smith
76ed56905a postmarketos-mkinitfs: don't fail without deviceinfo [skip ci] (#1269)
When building device packages, the postmarketos-mkinitfs package gets
installed as dependency of postmarketos-base. It must not try to
create an initramfs at this point, when there is not deviceinfo file.

We build the initramfs during the installation, so it's fine.

Added [skip ci] because linux kernels and KDE updates are currently
getting built for the binary repository (so Travis couldn't finish
anyway).
2018-02-26 23:57:56 +00:00
Daniele Debernardi
7cb729cbe3 Include fbdebug tool in debug-shell hook (#1266) 2018-02-26 20:32:01 +00:00
Oliver Smith
6d1af1b891 mkinitfs: Fail on missing depends / better usability in general (#1133)
* Fail if mkbootimg/uboot-tools are not installed, but creating a
  boot.img file / u-boot legacy image was requested via deviceinfo
  (fixes #312)
* Fail if /boot/dt.img is missing, but we have a qcdt device
* Fail if the dtb file specified in deviceinfo does not exist
* Fail if mkbootimg etc. exit with error code
* Don't try to add the ext4 module into the initramfs. We always
  compile it into the kernel. Instead, kconfig_check makes sure it
  is enabled now. (fixes #1037)
* Add a note that modprobe warnings can be ignored mostly
2018-01-31 19:39:09 +00:00
rrooij
bf0a5f0a21 deviceinfo: add blobtools options (#1118)
Add a blobtools option to the deviceinfo file for creating specific
blobs for the Asus TF101 tablet. This will make it easier to flash
afterwards with ADB.
2018-01-13 20:38:29 +00:00
drebrez
5c2e83f051 [initramfs] Set framebuffer mode earlier in the script (before hooks) (#1070) 2018-01-03 00:38:32 +00:00
Alex Roth
2a951d962d Add Teclast X80 Pro (EFI/x86_64 tablet) (#1050) 2017-12-29 02:02:29 +00:00
drebrez
0c63ff041c Feature debug-shell (#1028)
* Changed usb-shell behavior, it wait for some user action before continue booting
* Rename usb-shell to debug-shell and changed port to 23
* Add `20-debug-shell.sh` script to static code analysis
* Enable eth0 interface in initramfs (qemu)
* Add additional script to run a shell in order to be able to kill it from a telnet session
2017-12-23 19:22:28 +00:00
Pablo Castellano
b7d1905f30 postmarketos-mkinitfs: Handle "deviceinfo_bootimg_qcdt" boolean properly (#914) 2017-11-19 14:25:10 +00:00
drebrez
c33e5d823e Add PMOS_FORCE_PARTITION_RESIZE kernel boot parameter (#874) 2017-11-04 22:54:42 +00:00
drebrez
95b694bda3 Implement cache for initramfs-extra (#796)
Partially implements:
<https://github.com/postmarketOS/pmbootstrap/issues/411>
2017-10-22 21:00:39 +00:00
clayton craft
842db355c1 Fix #774: Don't create device-mapper mapping without subpartitions (#775)
This causes initramfs to skip calling 'kpartx' when pmOS has been
installed on an external disk (e.g. sdcard). Fixes mounting pmOS_boot
by label (#774).
2017-10-20 17:20:40 +00:00
clayton craft
c7c2b2d02a Add osk-sdl as default luks unlock mechanism on boot (#476)
More information: <https://postmarketos.org/osk-port>
2017-10-14 18:10:12 +00:00
Martijn Braam
a3375bb0ba Removed a lot of hardcoded modules in mkinitramfs (#691)
This removes a few globs from the mkinitramfs module copy part. This is an issue
in linux-postmarketos since it will copy gpu drivers for all possible hardware to the
initramfs.

This should be done in the deviceinfo variables for the modules instead and is
already done for the current devices that use module loading. This changes the
initramfs (uncompressed) from 16 MB to 11 MB just because the qemu graphics
drivers aren't included.
2017-10-04 18:16:31 +00:00
drebrez
84466cd0b6 Fix postmarketos-splash version detection during generation of splash screens (#668) 2017-10-02 22:39:09 +00:00
Attila Szöllősi
41fcf67bc5 postmarketos-base: Write /boot to /etc/fstab (#653)
Also removed fstab entry from nokia-rx51 post-install script.
2017-09-30 21:52:33 +00:00
drebrez
e303ea7cf0 Set framebuffer mode in initramfs for all devices (#652) 2017-09-29 15:22:20 +00:00
drebrez
fbc909b7f4 Implement cache for generated splash screens (#620) 2017-09-24 14:24:56 +00:00
Martijn Braam
7abec5849b Deterministic dhcp lease (#619)
* Ensure leased ip is always 172.16.42.2
* Bumped version for postmarketos-mkinitfs
2017-09-23 14:23:38 +00:00
clayton craft
1b35dd595d Improve copy in mkinitfs (#599)
'install' does not properly handle symlinks, it copies the entire file
instead of a symlink to it. This PR uses `cp -a` to preserve symlinks.

For example, with `install`, the files libc.musl-armhf.so.1 and
ld-musl-armhf.so.1 are the same size, despite the fact that in rootfs
libc.musl-armhf.so.1 is actually a symlink to ld-musl-armhf.so.1.

According to @drebrez research, the initramfs size shrunk from 
1 567 930 to 1 168 591.
2017-09-20 18:36:22 +00:00
clayton craft
1bef78c6df Add msm-fb-refresher package and initfs config (#587)
* Add msm-fb-refresher package and initfs config
* Bump version for pmos-mkinitfs
* Create msm-fb-refresher openrc service
* kill refresher when initfs is done
2017-09-18 19:17:30 +00:00
Attila Szöllősi
5f754e3e64 Recovery installer zip (#404)
Supports flashing with TWRP and other Android recovery OS through adb sideload,
as well as exporting a generated recovery zip file.
See also:
https://github.com/postmarketOS/pmbootstrap/wiki/deviceinfo_flash_methods#recovery-mode-adb
2017-08-24 21:07:36 +00:00
clayton craft
43dba29089 Fix issue with deviceinfo modules not loading in init (#451)
When modules are surrounded with quotes, modprobe seems to be treating
them as all one module and none of them are actually loaded.
On the N900, where a watchdog module MUST be loaded on boot, this
results in the device shutting down after 30 seconds. This commit
corrects this in init.sh.in
2017-08-23 17:05:05 +00:00
Pablo Castellano
1e71befed4 Yet another minor fixes PR (#395)
* postmarketos-splash: print filename to log file
* postmarketos-mkinitfs: removed old unused check
The variable name was wrong and never happened
https://github.com/postmarketOS/pmbootstrap/pull/395#pullrequestreview-56977439
2017-08-21 15:08:14 +00:00
Pablo Castellano
e0d3d1530f Close #362: Add deviceinfo to initramfs (#394)
* Added deviceinfo to initramfs
* init.sh.in: removed @MODULES@ variable
* Add and describe new copy_files parameter for changing file mode bits
2017-08-20 19:45:26 +00:00
drebrez
b6ceef5138 Detect and resize root partition on QEMU (#414)
To increase the size of the partition you simply increase the size of the image using `truncate -s +200M /path/to/qemu.img` for example and then start QEMU.

More information:
https://github.com/postmarketOS/pmbootstrap/wiki/Common-Qemu-Notes#increase-partition-size
2017-08-18 22:39:32 +00:00
PureTryOut
e0d464370c Fix usb networking on the Sony Amami (#357) 2017-08-09 21:54:01 +00:00
Yuval Adam
321156e59b 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
a69344c067 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
Oliver Smith
bbf1e22063 Fix 'install: can't stat' message, when no hook is installed (#310) 2017-08-06 13:12:43 +00:00
drebrez
4a3a02c60a 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
3e140ea690 Close #194: Aports subfolders! See migration guide in the wiki (#227)
Migration guide:
https://github.com/postmarketOS/pmbootstrap/wiki/Migration-to-aports-subfolders
2017-07-28 22:34:40 +00:00