400 Commits

Author SHA1 Message Date
Michael Stapelberg
1bbb70b90d README: use sdx to prevent mistakes 2019-02-07 14:40:40 +01:00
Michael Stapelberg
f352a9f6d1 gofmt parttable.go 2019-01-05 23:04:46 +01:00
Michael Stapelberg
b3188e62b2 travis: update to Go 1.11 2019-01-05 23:02:41 +01:00
Michael Stapelberg
d5a93c3f7e localtime: correct path to Go’s zoneinfo.zip 2019-01-05 23:01:43 +01:00
Michael Stapelberg
2c4d21a7dd localtime: fall back to Go’s zoneinfo.zip
And don’t error out if that’s missing. gokrazy can still boot.
2019-01-05 22:38:12 +01:00
Michael Stapelberg
6219658570 use sudo to elevate privileges when required
fixes #9
2018-11-01 16:59:56 +01:00
Michael Stapelberg
09013ce6e2 -override: verify no partitions of the target device are mounted 2018-11-01 09:48:12 +01:00
Michael Stapelberg
09e23c73a7 -overwrite: seek instead of relying on re-reading the partition table
This makes the packer more flexible with regards to permissions: write
permissions for the target device are now sufficient.

The downside is that the SD card needs to be unplugged and re-plugged before the
persistent file system can be created (if desired).

related to https://github.com/gokrazy/tools/issues/9
2018-11-01 09:46:34 +01:00
Michael Stapelberg
c0b0f8c450 /dev/loop uses p<num> syntax for partitions, too 2018-10-26 20:52:26 +02:00
Michael Stapelberg
7075e42531 completeness check: spell out -gokrazy_pkgs default 2018-10-19 18:27:52 +02:00
Michael Stapelberg
6b72ed5692 completeness check: include github.com/gokrazy/gokrazy for init 2018-10-19 18:27:30 +02:00
Michael Stapelberg
25fb563340 parttable: use linux type for root partitions (Thanks lichti) 2018-10-18 17:41:06 +02:00
Michael Stapelberg
4c8bec4443 don’t error on unimplemented MBR update handler
(for backwards compatibility)
2018-07-13 23:55:13 +02:00
Michael Stapelberg
117f7cc504 get kernel/firmware repository at runtime, not build time
This avoids unnecessary downloads/disk usage when not using the standard
kernel/firmware repositories.
2018-07-13 23:26:42 +02:00
Michael Stapelberg
c74380b015 move writeMBR to write.go for consistency 2018-07-12 09:56:28 +02:00
Michael Stapelberg
7b3a628a7c add MBR log message 2018-07-12 09:56:01 +02:00
Michael Stapelberg
3af2dd8298 update MBR, too 2018-07-12 09:26:55 +02:00
Michael Stapelberg
5b02a8488e Bugfix: don’t accidentally shadow isDev (for -overwrite with -update) 2018-07-12 09:24:45 +02:00
Michael Stapelberg
d32bdc71ea Bugfix: swap rootSize/bootSize for -overwrite=<file> with -update 2018-07-12 09:12:59 +02:00
Michael Stapelberg
9511aecee3 introduce -overwrite_mbr flag 2018-07-11 08:36:59 +02:00
Michael Stapelberg
fe4f39371f packer: ensure CGO_ENABLED=0 2018-07-10 08:12:50 +02:00
Michael Stapelberg
aac9d9deb1 packer: give more helpful -target_storage_bytes error messages 2018-07-08 22:03:19 +02:00
Michael Stapelberg
41b65e1d8a -serial_console: use argument in console= directive
The special value UART0 is still supported for backwards compatibility.

This change makes using the serial console possible on platforms which don’t use
ttyAMA0.
2018-07-08 22:03:19 +02:00
Michael Stapelberg
b6511f99a7 packer: include MBR bootloader 2018-07-08 22:03:17 +02:00
Michael Stapelberg
7130054859 introduce -gokrazy_pkgs flag 2018-07-07 00:07:36 +02:00
Michael Stapelberg
e77cf46fc7 introduce -kernel_package and -firmware_package flags 2018-07-07 00:06:00 +02:00
Michael Stapelberg
c6e37c01a3 lift 8.3 file name length restriction 2018-06-21 23:26:44 +02:00
Michael Stapelberg
8dc67f0a9e populate /etc in the file system
Now that symlinks and long file names are supported, we no longer need to mount
a tmpfs on /etc and install a bunch of hacks.
2018-06-21 23:24:15 +02:00
Michael Stapelberg
1450d301b4 Use Squashfs for the root file system (instead of FAT)
This paves the way for a bunch of other cleanups, such as full file names (no
more 8.3) or symbolic links, allowing us to clean up our directory structure.

Also, thanks to Squashfs’s compression, images are smaller and hence updates are
faster: a 95M FAT image shrinks to a 36M Squashfs image, reducing the update
time from about 20s to about 7s.
2018-06-21 19:23:48 +02:00
Michael Stapelberg
3b53372b3e take default -update value from GOKRAZY_UPDATE environment variable
related to https://github.com/gokrazy/gokrazy/issues/38
2018-03-29 11:59:04 +02:00
Michael Stapelberg
34459742a0 update FAT16B writer import path 2017-07-14 03:19:58 +02:00
Michael Stapelberg
7d2208670a refactor logic into function to make defer work
fixes #7
2017-06-18 15:38:55 +02:00
Philipp Adolf
ea335c3552 Fix typo in packer.go (#6) 2017-05-27 19:08:58 +02:00
Michael Stapelberg
f44c368659 packer: handle -overwrite_{boot,root} being both present
fixes #5
2017-05-02 19:17:33 +02:00
Michael Stapelberg
410cb12c88 README: fix typo
related to https://github.com/gokrazy/gokrazy/issues/27
2017-05-01 22:54:42 +02:00
Michael Stapelberg
f30c3b762c packer: make messages more verbose
fixes #4
2017-03-26 20:04:51 +02:00
Tom Payne
f364665973 Find macOS Homebrew CA certs (#3)
* factor out cacerts_linux.go

* add initial cacerts_darwin.go

This assumes that the user has OpenSSL installed with Homebrew. A better
fix would be to use the logic from go1.8/src/crypto/x509/root_darwin.go.
2017-03-23 17:43:36 -04:00
Michael Stapelberg
721649e87a make log message use correct partition paths, too 2017-03-18 18:03:52 +01:00
Michael Stapelberg
625f7483e5 fall back to ~/.config/gokrazy/cacert.pem (for non-linux)
related to https://github.com/gokrazy/gokrazy/issues/14
2017-03-18 17:59:17 +01:00
Michael Stapelberg
39fb622ce1 move re-reading partition table to os-specific files
related to https://github.com/gokrazy/gokrazy/issues/14
2017-03-18 17:59:17 +01:00
Michael Stapelberg
a53a12d37f implement getting device size on darwin
related to https://github.com/gokrazy/gokrazy/issues/14
2017-03-18 17:59:13 +01:00
Michael Stapelberg
f02bb5d9c0 spelling: s/found/find/ 2017-03-18 17:27:39 +01:00
Michael Stapelberg
ad0618b8e4 correctly locate partitions on macOS (e.g. /dev/{r,}disk2s1)
related to https://github.com/gokrazy/gokrazy/issues/14
2017-03-18 17:27:39 +01:00
Will Glynn
fb7c213e76 Also specify GOOS (#1) 2017-03-14 14:22:34 -04:00
Michael Stapelberg
37c5d4d498 Correctly locate partition path for mmcblk devices 2017-03-14 09:51:36 +01:00
Michael Stapelberg
68aa45d116 import an empty package instead of the gokrazy package
fixes https://github.com/gokrazy/gokrazy/issues/14
2017-03-05 20:29:30 +01:00
Michael Stapelberg
05c574638d add travis config 2017-03-04 17:27:53 +01:00
Michael Stapelberg
7f0229b37a pass through fixed environment
…instead of building a good environment from the ground up. This is a
prerequisite for travis runs working properly, and presumably other more
exotic go installations.
2017-03-04 17:26:58 +01:00
Michael Stapelberg
c48879c00f make gokr-updater compile (whoops) 2017-03-04 17:25:42 +01:00
Michael Stapelberg
95ef4052df Initial commit 2017-03-04 11:32:58 +01:00