flake: use the uImage format for not-os #9

Merged
sb10q merged 1 commits from fsagbuya/nix-servo:uimage into master 2023-12-13 17:46:37 +08:00
Collaborator

Description

The added patch aims to:

  1. Add support for u-boot wrapped kernel and initrd for zynq image
  2. Use the zc706 zynq variant

Tested to boot on zynq-zc706 board.

Reference:

Platform is now also customizable in the flake by exposing the attributes of crossSystem.

### Description The added patch aims to: 1. Add support for u-boot wrapped kernel and initrd for zynq image 2. Use the `zc706` zynq variant Tested to boot on zynq-zc706 board. Reference: - **initrd**: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842473/Build+and+Modify+a+Rootfs - **kernel**: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842481/Build+kernel Platform is now also customizable in the flake by exposing the attributes of `crossSystem`.
sb10q reviewed 2023-12-13 11:16:16 +08:00
flake.nix Outdated
@ -226,3 +232,2 @@
platform = system: (import nixpkgs { config = {}; }).platforms.armv7l-hf-multiplatform;
system = "x86_64-linux";
crossSystem.system = "armv7l-linux";
crossSystem = {
Owner

Why is this duplicating the code already in not-os?

Why is this duplicating the code already in not-os?
Author
Collaborator

I initially thought this was also not needed. However, omitting this part results to:

cp: cannot stat 'arch/arm/boot/uImage': No such file or directory

It appears this is just how the process operates, especially considering how the not-os part is structured in the flake. It seems like this flake and the not-os flake function as separate entities, with each only modifying and building upon the not-os modules.

I initially thought this was also not needed. However, omitting this part results to: ``` cp: cannot stat 'arch/arm/boot/uImage': No such file or directory ``` It appears this is just how the process operates, especially considering how the not-os part is structured in the flake. It seems like this flake and the not-os flake function as separate entities, with each only modifying and building upon the not-os modules.
Owner

Most likely you're just doing it wrong and not understanding what is really going on. Read the not-os code carefully.

Most likely you're just doing it wrong and not understanding what is really going on. Read the not-os code carefully.
fsagbuya force-pushed uimage from 02ef298038 to 3b34e11cbf 2023-12-13 17:16:39 +08:00 Compare
Author
Collaborator

Updated.

  • Patches from not-os flake moved to zynq_image.nix module to avoid redundancy and complexity.
  • platform definition removed as already defined in the updated patch.

Build log:

nix build .#packages.armv7l-linux.zc706-not-os -L --show-trace && ls ./result/
devicetree.dtb
qemu-script
root.squashfs
toplevel
uImage
uramdisk.image.gz
Updated. - Patches from not-os flake moved to `zynq_image.nix` module to avoid redundancy and complexity. - platform definition removed as already defined in the updated patch. Build log: ``` nix build .#packages.armv7l-linux.zc706-not-os -L --show-trace && ls ./result/ devicetree.dtb qemu-script root.squashfs toplevel uImage uramdisk.image.gz ```
sb10q merged commit 3b34e11cbf into master 2023-12-13 17:46:37 +08:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nix-servo#9
No description provided.