11 Commits

Author SHA1 Message Date
Gabriel Marcano
a15c02f3aa archive: support using lz4 legacy (MR 36)
fixes: https://gitlab.com/postmarketOS/postmarketos-mkinitfs/-/issues/27
2023-04-10 17:45:59 -07:00
Clayton Craft
8f505ffdc8 go.mod: set min version to 1.20
Fixes some build issues when using vendored dependencies.
2023-03-01 12:56:21 -08:00
Clayton Craft
786e09d855 archive: support using lzma (MR 25)
fixes: https://gitlab.com/postmarketOS/postmarketos-mkinitfs/-/issues/2
2023-02-24 09:21:24 -08:00
Clayton Craft
52fc741ba8 archive: support using zstd (MR 25)
This external module was chosen because it's a native Go implementation
of zstd, and not a wrapper around some external utility or some CGO
thing.
2023-02-24 09:21:23 -08:00
Clayton Craft
6aec4d564c archive: remove pgzip, use gzip from go std lib (MR 25)
This replaces the parallel gzip with the boring gzip from Go's standard
lib. The main motivations for doing this are:

1) Reduce runtime memory requirements

2) shed some external dependencies

There's obviously a trade-off with compression speed/time (as seen
below), but I feel like it's a worthwhile trade-off.

Note that there's likely very little impact to boot performance wrt
extracting these archives, the compression levels are similar.

Measured on a Shift 6mq, which is a very fast phone...

** compress/gzip:

User time (seconds): 1.81
System time (seconds): 0.38
Percent of CPU this job got: 104%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:02.09
Maximum resident set size (kbytes): 62024

-rw-r--r-- 1 clayton clayton 6.1M Sep 20 17:20 initramfs
-rw-r--r-- 1 clayton clayton 2.5M Sep 20 17:20 initramfs-extra

** pgzip:

User time (seconds): 1.19
System time (seconds): 0.48
Percent of CPU this job got: 159%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:01.05
Maximum resident set size (kbytes): 109952

-rw-r--r-- 1 clayton clayton 6.8M Sep 20 17:20 initramfs
-rw-r--r-- 1 clayton clayton 2.8M Sep 20 17:20 initramfs-extra

inspired by: https://gitlab.com/postmarketOS/pmaports/-/issues/1704
2023-02-24 09:21:22 -08:00
Clayton Craft
d9f29af446 deviceinfo: implement a new simple parser (MR 4)
This replaces an external toml library with a simple parser for
unmarshalling a deviceinfo.
2021-09-09 20:20:41 -07:00
Clayton Craft
5dfd1e3787 use flag module from std lib for parsing cmdline args
The getopt thing was an experiment, and I'd rather lose external
dependencies than use getopt-like parsing especially since the only
argument this app takes is largely for testing/development purposes
only.
2021-09-04 23:51:26 -07:00
Clayton Craft
4293c887f8 Deviceinfo: replace toml lib, improve struct member names
See: #6
2021-09-03 22:47:02 -07:00
Clayton Craft
a928314ffb include go.sum
https://github.com/golang/go/wiki/Modules#should-i-commit-my-gosum-file-as-well-as-my-gomod-file

`go mod tidy` was also run on the go.mod file
2021-08-10 14:05:58 -07:00
Clayton Craft
a381516e53 rename project to postmarketos-mkinitfs
To help prevent any confusion about which distro this 'mkinitfs' is
intended for
2021-08-10 14:03:34 -07:00
Clayton Craft
64195a5f83 initial commit 2021-08-09 15:23:39 -07:00