Commit Graph

1449 Commits

Author SHA1 Message Date
Pablo Castellano 8ba6db98af Added profile.sh and initfs-hook hacks
Weston works! (and has red screen bug)

Note: I have to manually ssh and
sh /etc/postmarketos-mkinitfs/hooks/00-device-motorola-titan.sh
2017-06-28 20:09:27 +02:00
Pablo Castellano 1dff03e42d Use dtb image. It finally boots! 2017-06-28 20:09:27 +02:00
Pablo Castellano 85304cacc3 Disable CONFIG_KERNEL_XZ 2017-06-28 20:09:27 +02:00
Pablo Castellano 882133ad36 Enable CONFIG_DEVTMPFS=y 2017-06-28 20:09:27 +02:00
Pablo Castellano 4e2a68bc44 Removed some unnecessary changes from gcc5 big patch 2017-06-28 20:09:27 +02:00
Pablo Castellano fd1090574e Flash time! 2017-06-28 20:09:27 +02:00
Pablo Castellano 848da0a068 Kernel compiles!
- Removed -Werror
- Use linux-lg-mako as base
- Split big .diff in .patch files so that they are automatically applied

- Applied patches to kernel
  Previously it was stuck showing this error:
  https://pastebin.com/L7Q01Q7s

  See:
  https://forum.armbian.com/index.php?/topic/545-building-kernel-with-gcc5/
  https://github.com/xapp-le/owl/issues/4

  Other interesting changes to merge:
  5236526cf8
2017-06-28 20:09:27 +02:00
Pablo Castellano fcd73caf4c After menuconfig and accept all default values 2017-06-28 20:09:27 +02:00
Pablo Castellano 2e7a414f90 Use LineageOS kernel
Copied defconfig from
https://github.com/LineageOS/android_kernel_motorola_msm8226/blob/cm-14.1/arch/arm/configs/titan_defconfig
2017-06-28 20:09:27 +02:00
Pablo Castellano 4f8531f39a APKBUILD + deviceinfo (work in progress)
- Removed ACTIVATE_DOWNLOAD_MODE.txt and ACTIVATE_RECOVERY.txt

From lineage-14.1-20170602-nightly-titan-signed.zip

$ unpackbootimg -i boot.img
Android magic found at: 0
BOARD_KERNEL_CMDLINE androidboot.bootdevice=msm_sdcc.1 androidboot.hardware=qcom vmalloc=400M utags.blkdev=/dev/block/platform/msm_sdcc.1/by-name/utags buildvariant=userdebug
BOARD_KERNEL_BASE 00008000
BOARD_RAMDISK_OFFSET 01000000
BOARD_SECOND_OFFSET 00f00000
BOARD_TAGS_OFFSET 00000100
BOARD_PAGE_SIZE 2048
BOARD_SECOND_SIZE 0
BOARD_DT_SIZE 1763328
2017-06-28 20:09:27 +02:00
Pablo Castellano bbf3913428 Porting to Moto G 2014 "titan"
- Use samsung-i9100 as template
2017-06-28 20:09:27 +02:00
Oliver Smith 8cadf5bff2 Merge pull request #118 from Nutcake/master
Device LG G3 Global (d855)
2017-06-28 17:08:14 +00:00
Nutcake b129beb18f Adjust defconfig path 2017-06-28 18:55:15 +02:00
Oliver Smith 5b00843301
Fix /proc/cmdline grepping: /proc must be mounted first 2017-06-28 18:13:02 +02:00
Oliver Smith c6214c05e0
postmarketos-mkinitfs: Major refactoring
* rewrote find_root_partition to make it compatible with the i9100
  again (and added a big description comment about how it works)
* usb network and dhcp server gets started independent of hooks
  now. this really makes sense for development now, we can disable
  this later (and set up networking via OpenRC, when the usb-shell
  hook is not installed)
* telnet splash + unlock telnetd code only runs, when the rootfs
  is encrypted
* usb_setup_android wrapped with a generic usb_setup function, so
  we can support networking for more device types in a clean way
* the IP of the device is now in init_functions.sh, and init_functions.sh
  gets included in all hooks.
* rewrote logging function. it logs all stdout and stderr to
  /pmOS_init.log, except when PMOS_NO_OUTPUT_REDIRECT is specified
  as kernel command line. This way we can see error output from
  all commands.
* used shfmt to format everything, so it looks consistent again
* added automatic shellchecking for init.sh.in and
  init_functions.sh
* clear naming scheme for initfs functions, they all start with a
  verb now (e.g. setup_usb_network, start_udhcpd, ...)
2017-06-28 17:32:16 +02:00
Oliver Smith 4573863561
Rename args.no_fde to args.full_disk_encryption 2017-06-28 17:22:48 +02:00
Oliver Smith 86cb9f5ec8
Merge branch 'optional_full_disk_encryption' of https://github.com/PabloCastellano/pmbootstrap into optional-fde 2017-06-28 17:16:56 +02:00
Nutcake 6de9025230 Add new device lg-d855 2017-06-28 00:31:22 +02:00
Oliver Smith 28a0e10e56
pmb.chroot.apk.installed(): use apk's internal database
...instead of running apk every time to get the list of installed
packages and their versions. The internal package database from
apk has the same format, as the extracted APKINDEX file (except
that it has more key-value pairs, which we ignore/do not need
right now). So the APKINDEX code has been extended to parse both
tar-packed APKINDEX files and regular text files in the APKINDEX
format.

This is required for #108, for a better detection of outdated
packages (because the internal package database  saves the
package's timestamp, too). A nice benefit is, that this is faster
than calling apk every time and it doesn't fill up the log as much.

I've also used this improved function for determining the apk
version (for the outdated version check), and I've deleted
pmb.parse.other.package_split(), as it is not needed anymore.
2017-06-27 17:56:15 +02:00
Oliver Smith 19b93c2d04
Prepare for aarch64 host support, fix typo in arch mapping
Relates to #106.
2017-06-27 00:28:11 +02:00
Oliver Smith fcc5501a44
Slightly improve error handling
* Fix: Do not swallow traces when crashing before log init (e.g.
  during argument parsing)
* Show a link to the troubleshooting page, when an error happens
* (Formatting done by autopep8 in pmb/config/init.py)
2017-06-27 00:23:21 +02:00
Oliver Smith 060e5a5876 Merge pull request #111 from PabloCastellano/develop
* new aport: `extract-dtb`
* trailing new line in `musl-*` aports
* add vim temporary files to `.gitignore`
2017-06-25 19:45:07 +00:00
Pablo Castellano 404e788cdd gitignore: Added vim temporary files 2017-06-25 21:40:49 +02:00
Pablo Castellano 81cd2d8df4 Added extract-dtb tool 2017-06-25 21:40:49 +02:00
Pablo Castellano 7e79d20a0b aportgen: Added end of file newline 2017-06-25 21:40:49 +02:00
Oliver Smith c2eceefb5a Merge pull request #113 from PabloCastellano/device-lg-hammerhead
Fix red screen bug in hammerhead
2017-06-25 19:32:23 +00:00
Pablo Castellano e64144acaa [postmarketos-base][hammerhead] Use weston --pixman-type
Add a new optional variable weston_pixman_type in deviceinfo
This is used to fix the red screen issue (close #54)
2017-06-25 21:25:40 +02:00
Oliver Smith c3011c953a Merge pull request #112 from craftyguy/fix_init_relpath
Support relative path for initializing config
2017-06-25 19:00:42 +00:00
Clayton Craft da9af8ee87 Support relative path for initializing config
Previously, if you passed something like ~/build to the init function
for work directory, it would create a directory, .\~/ in the current
working directory instead of resolving ~/ to the user's home directory.
This allow allows using ../ to specify a path.
2017-06-25 18:53:47 +00:00
Oliver Smith 7380b60472
Update musl-* to 1.1.16-r14 2017-06-25 13:38:39 +02:00
Oliver Smith ed58ae3a79
Close #103: Document how to use chroot commands with parameters 2017-06-23 23:46:09 +02:00
Oliver Smith fb1e8ec73b
Update min apk version/add more apk version checks
* Minimum version: 2.7.2 (which fixes two CVEs)
* Check the minimum apk version before doing something with apk and
  before entering the chroot manually (previously, it has just checked
  the apk-tools-static version, which gets used to set up the chroot)
* Reword the message for an outdated APK version. Most likely it is
  just the outdated http cache, instead of a man-in-the-middle attack.

See also:
b849b481a0
2017-06-23 17:04:49 +02:00
Pablo Castellano 920d4c8198 Mount unencrypted root partition (close #86)
- Do not decrypt if not necessary
- Do not launch telnetd if partition is unencrypted
- Basic initramfs logging to /tmp/boot.log
2017-06-22 20:14:38 +02:00
Pablo Castellano 0346b7a77a Find root partition using labels
For some reason /dev/disk/by-label/pmOS_root symlink is not present and
blkid from busybox doesn't support the -L parameter. We could install
blkid from util-linux but I prefered to use shell commands instead
2017-06-22 19:58:28 +02:00
Pablo Castellano efab93e4d0 Use variable in format.py and add labels to partitions 2017-06-22 19:58:28 +02:00
Pablo Castellano d4719f41c9 Added --no-fde parameter 2017-06-22 19:58:28 +02:00
Oliver Smith f547ff5c6e Merge pull request #102 from PabloCastellano/update_musl
Update musl-* to 1.1.16-r13
2017-06-22 13:52:24 +00:00
Pablo Castellano 0f3b2ea427 Update musl-* to 1.1.16-r13 2017-06-22 00:44:02 +02:00
Oliver Smith 51af907534
Slightly adjust README.md
* Change "GNU/Linux" into "Linux distribution", because the Alpine Linux developers don't see their distro as GNU/Linux
* Use "hello-world" as example package, as it does not make much sense right now to compile heimdall for armhf
2017-06-21 20:01:28 +02:00
Oliver Smith ed4275dd9b
Add support for the binary repository, inactive by default (#64)
* New commandline parameter --mirror-pmOS, where the binary repository
  URL for postmarketOS can be specified (empty by default as of now,
  this will be filled with the real URL once the repo works)
* Do not build packages, when they are in the binary repository and
  the version of the package in the binary repository is up-to-date.
* Add a testcase for pmb.build.is_necessary().
2017-06-20 20:13:05 +02:00
Oliver Smith 187bae1d1b
Fix commandline help wording 2017-06-20 19:12:41 +02:00
Oliver Smith 3642a53f20
Fix race condition in testcase test_challenge_build 2017-06-20 19:10:13 +02:00
Oliver Smith 9e723e7125 Merge pull request #98 from postmarketOS/device-nokia-rx51-modules
Device nokia rx51 modules
2017-06-20 15:32:07 +00:00
Oliver Smith 6751b2e8cb
Close #94: Always rebuild apks when aports change
...even if the pkgver and pkgrel have *not* changed. This should
make development much more intuitive. The detection works by looking
at the last modified timestamps, just like `make` does it.
2017-06-19 20:33:56 +02:00
Oliver Smith 328bed4ba2
Add testcases for pmbootstrap challenge.
* pmb/challenge/apk.py had to be renamed to pmb/challenge/apk_file.py,
  so the "internal" functions of that file could be accessed, while
  still providing the short notation pmb.challenge.apk().
* zap asks for each buildroot_* chroot, if you want to remove it, not
  only for the one with the device arch
* add new pmb.chroot.tempfolder() function, that creates a temporary
  folder, that belongs to "user" and deletes it, if it already exists.
  this function gets used in a few challenge testcases.
2017-06-19 20:07:51 +02:00
Martijn Braam cc118db72f Fixed module loading for n900 2017-06-19 00:05:37 +02:00
Oliver Smith e4df6c5d22
Fix #96: Check if build is necessary is broken.
When an APKINDEX contained a package with multiple versions,
pmbootstrap did not use the last version to determine if the
package is out of date (regression from af8c9fcf5b).
2017-06-18 22:15:36 +02:00
Martijn Braam c6509c482f Enabled module installing for the n900 kernel 2017-06-18 21:17:00 +02:00
Oliver Smith 4f030db299
gcc-aarch64: remove dependency on bash
This was added by mistake while testing the gcc-aarch64 aport.
2017-06-18 02:00:41 +02:00
Oliver Smith 748bd43620
Implement challenge for APKINDEX.tar.gz (part of #64) 2017-06-18 01:45:41 +02:00