New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Odroid HC2 #101
Comments
Good job on getting the Odroid HC2 to work with gokrazy! :) It’s really unfortunate that the Odroid platform is GPT-incompatible. Using the MBR/GPT hybrid nicely works across all currently supported systems (e.g. Raspberry Pi and x86_64) and keeps differences between installations to a minimum. Some early feedback to your changes:
In general, if you want to contribute supporting code like this (MBR-only mode) to the packer, it needs to be continuously tested or it will bitrot (and/or other development will break it accidentally). One way to do so would be to integrate your bootery instance into the official CI. |
Yeah, the bootloader scheme for this device is quite unfortunate and pretty rigid. The bootloader itself does support GPT (backup GPT table, if its intact). But I ran into issues with Linux refusing to boot with broken primary GPT. Also, relying on backup GPT at the end of the device makes it harder to build an image file - it has to be exactly the same size as the disk being written to.
Sounds good. I'll prepare some commits for these.
OK - you'll need to walk me through what's involved. |
Here's an example TOML file - https://github.com/anupcshan/odroidbake/blob/main/odroidhc2.toml |
@stapelberg Thanks for all the reviews! At this point, I can do a build/update/bootery cycle using https://github.com/anupcshan/odroidbake without any forks. This is one outstanding item around CI for mbr-only mode. I was thinking about having a modified version of https://github.com/gokrazy/gokrazy/blob/master/integration/uefiboot/uefiboot_test.go with the following changes:
I've tested out the booting with just MBR part - this was pretty easy to do. I don't think the root dev checks should be that much work. This way, anyone can repro/run tests on their local machine (and its already part of regular CI). What do you think? |
Very nice!
Yeah, an additional integration test (possibly sharing a bunch of code with the existing uefiboot test) for the odroid setup sounds good. Afterwards, we should include your bootery setup in our CI, too. |
Relevant PRs are all out/being merged.
Let me know what is involved here. |
Thanks for getting this all in place :) For the CI adjustments, I think we need to add an extra bootery call in the The The new extra Please set up a hostname (google “dyndns” if you’re unfamiliar) under which your bakery/bootery setup can be reached. I believe GitHub CI uses IPv4 only, so IPv6 connectivity is not sufficient. You can then email me the URL directly and I can set it up in the CI. |
Ah OK. I can't use One key difference from All of this has been running for at least a couple of weeks now. Apologies for the confusion - I thought there was some kind of device integration test when gokrazy/gokrazy or tools code gets upgraded.
|
Ah, understood! I suppose then the only remaining step is to add your repositories and a picture of the device to https://gokrazy.org/platforms/, and ideally some documentation to https://gokrazy.org/userguide/ :)
No, changes to those repositories are currently only tested in CI, not on-device. |
BTW, we now have https://gokrazy.org/platforms/#community, so that’d be a natural place to mention your odroid repositories, too :) |
Neat! I'll try and get to adding the documentation this week. |
@anupcshan I just got an HC4. I assume much of what you did for the HC2 would transfer to that. So I'd be pretty interested in that documentation :) And thanks for the effort you already put into it. |
@Merovius Nice! HC2/HC4 have different architectures (armhf vs arm64) - so, they won't be directly compatible. But a lot of the scaffolding work should still be beneficial for you (especially everything around u-boot). https://github.com/anupcshan/gokrazy-odroidxu4-kernel is a fork of https://github.com/gokrazy/kernel which builds U-boot/kernel for HC2. I think you should be able to reuse a lot of that, with appropriate config changes. I've sent out a change to document HC2 support in #151. |
I'm going to call this task done - I've been running gokrazy on 2 Odroid HC2 devices for the last 2 years without too many issues. Haven't had to do much in terms of maintenance other than periodically fixing u-boot or kernel breakages. I'd love to be able to use the external disk support in this machine as an alternate |
filed #236 to track this feature |
I have Gokrazy operating on an Odroid HC2 and have been using it for 2-3 months now. I have a partially functional bootery setup going to continuously validate that the hardware works as expected and verify kernel upgrades (needs some change to how cmdline.txt gets updated for testboot - will bring that up once this issue is resolved).
There are a couple of issues that needed to be solved:
The solutions I've come up with so far is:
/update/blockdev
) that will allow arbitrary writes to the block device. This is potentially dangerous and can seriously mess things up if there's a bug somewhere. An alternative would be to register a fixed set of named offsets and max lengths (like,bl1.bin
being at offset 512 and of max length 15K, updatable via/update/bl1.bin
).Let me know if folks have thoughts or suggestions or objections to anything above.
To be clear, I'm not looking for someone to actually support gokrazy on this device (happy to do that myself) - I just want to avoid forks and go.mod
replace
directives in a bunch of places :)The text was updated successfully, but these errors were encountered: