Skip to content

nextthing/chip: init#1807

Open
chuangzhu wants to merge 1 commit intoNixOS:masterfrom
chuangzhu:nextthing-chip
Open

nextthing/chip: init#1807
chuangzhu wants to merge 1 commit intoNixOS:masterfrom
chuangzhu:nextthing-chip

Conversation

@chuangzhu
Copy link
Copy Markdown

Description of changes

pocketchip

Things done
  • Tested the changes in your own NixOS Configuration
  • Tested the changes end-to-end by using your fork of nixos-hardware and
    importing it via <nixos-hardware> or Flake input

@chuangzhu chuangzhu force-pushed the nextthing-chip branch 2 times, most recently from 8562f3c to 332a98c Compare March 25, 2026 23:38
Comment thread nextthing/chip/common.nix
# Using overlays here so we can modularly override it in nand.nix and pocketchip.nix
nixpkgs.overlays = [
(final: _prev: {
ubootCHIP = final.buildUBoot {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overlays have a certain cost and prevent from re-using nixpkgs instances across Nico's systems. Is it possible to use callPackage here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should allow the same code sharing and is code flow wise easier to reason about.

Copy link
Copy Markdown
Author

@chuangzhu chuangzhu Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using overlays allow easy overriding and customization. The alternatives I tried seemed messy, especially if you consider that this device have a lot of "DIP"s (like Raspberry Pi HATs), PocketCHIP being one of them, each may want some extra U-Boot configurations.

@qbit
Copy link
Copy Markdown

qbit commented Mar 31, 2026

It sees the instructions for Install U-Boot to NAND are a bit off:

qbit@europa[0]:~/src/xin(main); nix build .\#nixosConfigurations.pc.config.system.build.uboot -o result-uboot -vL
fetching git input 'git+file:///home/qbit/src/xin'
warning: Git tree '/home/qbit/src/xin' is dirty
qbit@europa[0]:~/src/xin(main); ls result-uboot
nix-support  u-boot-sunxi-with-spl.bin
qbit@europa[0]:~/src/xin(main);

Testing building with nextthing-chip-pocketchip and nextthing-chip modules. Both produce only the u-boot-sunxi-with-spl.bin file.

@chuangzhu
Copy link
Copy Markdown
Author

Both produce only the u-boot-sunxi-with-spl.bin file.

Fixed :)

@qbit
Copy link
Copy Markdown

qbit commented Apr 10, 2026

I was able to install on my pocketchip with this :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants