Commit Graph

146 Commits

Author SHA1 Message Date
timmy fbdcde6baf Add trivial xattr support to squashfs
Push / CI (push) Has been cancelled
This is only implemented to support capabilities on installed packages
2025-12-28 14:20:18 -08:00
Michael Stapelberg c74b4e7749 httpclient: use os.ReadFile instead of deprecated ioutil.ReadFile 2025-12-09 17:36:00 +01:00
Michael Stapelberg fc385a9e3d httpclient: remove now-unused GetRemoteScheme 2025-12-09 17:35:39 +01:00
Michael Stapelberg 3c1aa9087c tlsflag,httpclient: remove global state 2025-12-08 21:31:10 +01:00
Michael Stapelberg 2e8be894f6 updateflag: remove global state
related to https://github.com/gokrazy/tools/pull/68
2025-12-06 08:41:40 +01:00
Michael Stapelberg cbfb18ae26 httpclient: use updateflag.Value instead of global access 2025-12-05 17:50:16 +01:00
Michael Stapelberg 95a29c8f05 updateflag: introduce Value type to avoid global state
related to https://github.com/gokrazy/tools/pull/68
2025-12-05 17:43:05 +01:00
Michael Stapelberg 839bc69fbd remove tlsflag and updateflag Register functions
These flags are no longer used.

related to https://github.com/gokrazy/tools/pull/68
2025-12-05 17:37:09 +01:00
Michael Stapelberg 05cd6a8b1b config: add BootloaderExtraEEPROM
related to https://github.com/gokrazy/gokrazy/issues/338
2025-11-16 19:07:01 +01:00
Steve Lam 5599791533 deviceconfig: add NanoPi NEO device config (#26) 2025-05-26 22:15:01 +02:00
Michael Stapelberg c2e4e2b4f6 config: add KernelExtraArgs (will end up in cmdline.txt)
related to https://github.com/gokrazy/gokrazy/issues/312
2025-05-20 22:59:45 +02:00
Michael Stapelberg 05ac5603c1 go mod tidy (the x/crypto dependency came from an untracked file) 2025-04-15 08:48:45 +02:00
Michael Stapelberg b6303a2c6b go.mod: bump language version to 1.24 2025-04-15 08:47:51 +02:00
Michael Stapelberg c7693c3bef GitHub Actions: bump action versions 2025-03-30 11:15:54 +02:00
Michael Stapelberg d5a706e350 config: add PackageConfig.GoBuildEnvironment 2025-03-30 11:13:25 +02:00
Michael Stapelberg 41d5d8fffb config: group PackageConfig struct fields into build time / run time 2025-03-30 11:03:52 +02:00
thielepaul f306dc6e70 config: add package config field to override basename (#24)
related to https://github.com/gokrazy/gokrazy/issues/303
2025-02-24 07:10:05 +01:00
Michael Stapelberg b1610a6e72 go mod tidy 2025-02-14 21:30:01 +01:00
Olivier Mengué e2973fe9fb squashfs: allow to compile on Windows (#22)
Drop use of golang.org/x/sys/unix which is dependent on GOOS and doesn't
expose the Unix file mode constants on Windows. Instead use hard coded
constants which is fine (and safer) to create a squashfs image.
2025-02-14 21:29:42 +01:00
Michael Stapelberg 423a5b587b config: add Environment, rename ReadFromFile to ApplyInstanceFlag
It now does more and is more descriptively named,
freeing the ReadFromFile name for a side-effect free entrypoint.

related to https://github.com/gokrazy/gokrazy/issues/191
2025-01-26 22:39:49 +01:00
dependabot[bot] 12aede575e build(deps): bump golang.org/x/crypto from 0.23.0 to 0.31.0 (#21)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.23.0 to 0.31.0.
- [Commits](https://github.com/golang/crypto/compare/v0.23.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-12 08:23:17 +01:00
Michael Stapelberg 6ab9fef830 bootloader: fix 15/16 MB kernel size limit
The adc instruction fix was contributed by abbeyj on lobsters (thank you!).

fixes https://github.com/gokrazy/gokrazy/issues/248
2024-08-27 21:00:26 +02:00
Anup Chenthamarakshan a0f1dee26e deviceconfig: Rock64 device config (#20)
... also add BootPartitionStartLBA option

related to https://github.com/gokrazy/gokrazy/issues/270
2024-06-29 17:06:25 +02:00
Michael Stapelberg 95c24add2d config: switch to gokrazy/kernel.rpi as default kernel
This kernel has the broadest device compatibility (incl. Pi 5).

related to https://github.com/gokrazy/gokrazy/issues/223
2024-06-23 11:08:36 +02:00
Michael Stapelberg 71d9c6c36b fat: add Exists method for detecting accidental overwrites 2024-06-23 10:32:20 +02:00
Brad Fitzpatrick 3c7bf66a62 Add UpdateStruct.NoPassword field (#19)
To be used by future changes in other repos.

Updates gokrazy/gokrazy#265

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-06-07 18:07:28 +02:00
Michael Stapelberg 68dd68393b gpt: fix test 2024-05-10 18:55:00 +02:00
Michael Stapelberg eb715ca0bb gpt: return all partition UUIDs
related to https://github.com/gokrazy/gokrazy/issues/236
2024-05-10 18:52:02 +02:00
Michael Stapelberg a48c0b92e8 config: define MountDevices
related to https://github.com/gokrazy/gokrazy/issues/236
2024-05-10 18:27:12 +02:00
Michael Stapelberg cfc6cfe7d0 bump language version to go 1.21 (oldest supported release) 2024-05-10 17:49:18 +02:00
Michael Stapelberg d29c615f07 build bootloader with make; generate ELF with debug symbols
This doesn’t change the bootloader bytes themselves (bootloader.img),
but helps with debugging in GDB+QEMU.
2024-02-03 19:25:42 +01:00
Michael Stapelberg 76ca7a09ea switch from generating go source to go:embed 2024-02-03 19:22:38 +01:00
Michael Stapelberg cd6fdff7bb mbr: write bootloader to bootloader.img as well 2024-02-03 19:20:49 +01:00
Michael Stapelberg b4318213fb config: add BootloaderExtraLines
This is an array of strings because JSON does not support multi-line strings
natively, and working with a single long line with multiple \n is error-prone.

related to https://github.com/gokrazy/gokrazy/issues/216
2023-12-15 15:17:37 +01:00
Michael Stapelberg cb94242910 writer: fix writing directories with many entries
This fixes writing out (for example) device tree overlay directory.

We now write the directory entries twice:
Once for figuring out the correct firstCluster values,
then again for writing out the correct firstCluster values.

related to https://github.com/gokrazy/gokrazy/issues/216
related to https://github.com/gokrazy/tools/pull/67
2023-12-15 08:53:26 +01:00
Michael Stapelberg a645001f8b BaseURL: select port based on schema, plumb through custom httpsPort
Thanks to Christian Schlögl for the report.
2023-10-31 19:29:44 +01:00
Michael Stapelberg 235d00ca48 GitHub Actions: use setup-go@v4, which enables caching 2023-10-13 08:53:56 +02:00
Michael Stapelberg a51d461685 fat: fix padding (for FAT16): need to use usable FAT entries 2023-10-13 08:52:06 +02:00
Michael Stapelberg 5aab2d692f fat: fix data sector calculation
The FAT contains two unusable entries at the beginning that do not represent
data, so those shouldn’t be counted when determining the number of data sectors.
2023-10-13 08:52:06 +02:00
Michael Stapelberg 4e41a6d1cc add minimal fuzz test 2023-10-13 08:52:06 +02:00
Damiano Donati a93c67aeb3 config: InternalCompatibilityFlags: add SudoOrDefault accessor (#18) 2023-10-10 22:20:00 +02:00
Michael Stapelberg 5f469e7488 instanceflag: make ParentDir() absolute
related to https://github.com/gokrazy/tools/issues/50
2023-03-13 08:49:23 +01:00
Michael Stapelberg 5c1bb011aa add SerialConsoleOrDefault() accessor 2023-02-28 22:10:39 +01:00
dependabot[bot] 4c2e5af2e9 build(deps): bump golang.org/x/sys (#17)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20210616094352-59db8d763f22 to 0.1.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-25 16:31:38 +01:00
Michael Stapelberg 9608422911 initialize instance flag to $PWD if inside an instance dir
(for convenience)
2023-02-11 18:14:10 +01:00
Michael Stapelberg 05b4335416 config.ReadFromFile: include path in JSON error message
fixes https://github.com/gokrazy/tools/issues/47
2023-02-06 08:43:49 +01:00
Michael Stapelberg 7f0148dbcd include gokrazy/cmd/heartbeat as gokrazy system package
heartbeat is a no-op if not configured.

related to https://github.com/gokrazy/gokrazy/issues/167
2023-02-05 16:03:18 +01:00
Michael Stapelberg fd31300b8b gpt: implement reading partition entries 2023-01-25 22:12:14 +01:00
Michael Stapelberg a6cc5568b3 httpclient.For: fall back to cfg.Hostname 2023-01-22 18:31:18 +01:00
Michael Stapelberg 8b3fd7aed8 config: ensure Update and InternalCompatibilityFlags are not nil
related to https://github.com/gokrazy/tools/issues/43
2023-01-17 19:04:42 +01:00