Skip to content
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

Add support for FriendlyELEC NanoPi K1 Plus #266

Draft
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

shvetsnikita
Copy link
Contributor

Hello!

This is work in progress. I tried to add NanoPi K1 Plus board support, but build fail for some reason:

***
*** Can't find default configuration "./configs/nanopi_k1_plus_defconfig"!
***
make: *** [3rdparty/kconfig/Makefile:49: nanopi_k1_plus_defconfig] Error 1
error: builder for '/nix/store/qanzsx3bn36hdwahlw6rc21g9z5gwzyb-crust-firmware-untagged-2023-02-28.drv' failed with exit code 2
error: 1 dependencies of derivation '/nix/store/3r51blna4kv3z1a797ilb9h5il521r7j-Tow-Boot-nanopi_k1_plus_defconfig-noenv-aarch64-unknown-linux-gnu-2023.07-007-pre.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5l90rm73n1sbxr4rn1njkhqvqiapysjq-Tow-Boot.friendlyElec-nanoPiK1Plus.2023.07-007-pre.drv' failed to build

@shvetsnikita
Copy link
Contributor Author

@samueldr samueldr marked this pull request as draft October 7, 2023 19:56
@samueldr samueldr added this to the 20YY.MM-008 milestone Oct 7, 2023
@samueldr samueldr added 4. type: new port 9. status: WIP The PR is not ready for merge, work in progress labels Oct 7, 2023
@samueldr
Copy link
Contributor

samueldr commented Oct 7, 2023

Right, this looks harder than it actually is.

error: builder for '/nix/store/qanzsx3bn36hdwahlw6rc21g9z5gwzyb-crust-firmware-untagged-2023-02-28.drv' failed with exit code 2
                                                                ^^^^^

The reason crust fails to build is because it's implicitly referring to a non-existent config:

Crust is not required for Allwinner systems.

Though it is generally assumed to exist. When not available, for now we use this unergonomic way to mark it as unavailable

diff --git a/boards/friendlyElec-nanoPiK1Plus/default.nix b/boards/friendlyElec-nanoPiK1Plus/default.nix
index eeae93f..ba096d7 100644
--- a/boards/friendlyElec-nanoPiK1Plus/default.nix
+++ b/boards/friendlyElec-nanoPiK1Plus/default.nix
@@ -15,5 +15,8 @@
     patches = [
       ./0001-nanopi-k1-plus-board-enablement.patch
     ];
+    builder.additionalArguments = {
+      SCP = "/dev/null";
+    };
   };
 }

This is because, somewhat by design, we have to dip ourselves into the implementation details in U-Boot to mark it as non-existent, as it is really preferred to have it available.

With this change Tow-Boot should build (it built for me).

@shvetsnikita
Copy link
Contributor Author

Indeed it helps, thanks!

Although I intentionally avoided this patch, there is nothing on the screen until KMS initialization. I tried to specify CONFIG_VIDEO_DE2=y but it didn't help. Any ideas what else worth a shoot?

I assume as is (no HDMI output at bootloader stage) it can not be merged? Or there is value in ability to select boot device at least via serial console? This board support eMMC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. family: allwinner 4. type: new port 9. status: WIP The PR is not ready for merge, work in progress
Development

Successfully merging this pull request may close these issues.

None yet

2 participants