!UUYziobKGGxpovWyAN:nixos.org

Robotnix

245 Members
Build Android (AOSP) using Nix | https://github.com/danielfullmer/robotnix75 Servers

Load older messages


SenderMessageTime
29 May 2024
@erahhal:matrix.orgerahhalThanks.18:23:02
@erahhal:matrix.orgerahhal My current strategy is to see what's different from this repo which successfully builds 21. 18:23:27
@atemu12:matrix.orgatemu12That sounds like a good plan18:32:40
@swendel:curious.bio@swendel:curious.bio joined the room.22:28:30
3 Jun 2024
@eyjhb:eyjhb.dkeyJhb Atemu: https://github.com/nix-community/robotnix/pull/227 any chance this can get merged? :D 08:13:47
@atemu12:matrix.orgatemu12I'll have to take a look13:50:54
@erahhal:matrix.orgerahhal

i've still been trying to get 21 to build in my free time. Realized that there were some issues with the update script that didn't fully populate device-dirs.json and vendor-dirs.json, specifically get_store_path in robotnix_common.py was returning the path with None/ appended to it. I addressed that, and it seems that the json files are fully populated. I did have to comment out adding a dependency to the vendor file (vendor/google/gs-common) as no repo seems to exist. Not sure where to find that repo. I tried building and now get a nix failure rather than an android build failure:

error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'cheetah-factory-2024060308.zip'
         whose name attribute is located at /nix/store/d0dl9ch4hhxkqikc1dw3868j95gsbb0h-source/pkgs/stdenv/generic/make-derivation.nix:205:7

       … while evaluating attribute 'buildCommand' of derivation 'cheetah-factory-2024060308.zip'

         at /nix/store/d0dl9ch4hhxkqikc1dw3868j95gsbb0h-source/pkgs/build-support/trivial-builders.nix:74:14:

           73|       name = lib.strings.sanitizeDerivationName name;
           74|       inherit buildCommand;
             |              ^
           75|       passAsFile = [ "buildCommand" ]

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute '"vendor/google/gs-common"' missing

       at /nix/store/d0dl9ch4hhxkqikc1dw3868j95gsbb0h-source/lib/attrsets.nix:107:50:

          106|   */
          107|   getAttrs = names: attrs: genAttrs names (name: attrs.${name});
             |                                                  ^
          108|

17:56:59
@atemu12:matrix.orgatemu12The easy way is to blacklist the device which pulls in the vendor dir17:59:47
@atemu12:matrix.orgatemu12As for the stack trace, you truncated away the actual error18:00:12
@erahhal:matrix.orgerahhal

Ah yes, sorry:


       error: attribute '"vendor/google/gs-common"' missing

       at /nix/store/d0dl9ch4hhxkqikc1dw3868j95gsbb0h-source/lib/attrsets.nix:107:50:

          106|   */
          107|   getAttrs = names: attrs: genAttrs names (name: attrs.${name});
             |                                                  ^
          108|

18:09:57
@erahhal:matrix.orgerahhalWhere is that blacklist?18:10:13
@erahhal:matrix.orgerahhal * Where is the blacklist18:10:27
@erahhal:matrix.orgerahhalThis does also seem to be broken for android 13 on master, but it fails with gs101 instead of gs-common when building for cheetah18:19:02
@erahhal:matrix.orgerahhalIf I remove the gs-common dependencies, 14 also fails on gs101.18:19:28
@erahhal:matrix.orgerahhalI guess those are dependencies for the tensor chip?18:20:09
@erahhal:matrix.orgerahhalAre they not necessary? I will try commenting those out as well18:20:24
@erahhal:matrix.orgerahhalTo get past the errors, had to remove gs101, gs201, pantah, and pantah-kernel as well...18:23:01
@erahhal:matrix.orgerahhalNo idea if those are necessary. I did patch the update script to pull from googlesource.com to get them to even be added. Perhaps they should just be blacklisted. Will try18:23:36
@erahhal:matrix.orgerahhal

Ok, it actually built around 300 source files! Then it failed with this:

note: keeping build directory '/tmp/nix-build-robotnix-lineage_cheetah-2024060317.drv-0'
error: builder for '/nix/store/ysklg1pa18cqjnlhf21i7qfrcmi6i8af-robotnix-lineage_cheetah-2024060317.drv' failed with exit code 1;
       last 10 log lines:
       > FAILED:
       > build/make/core/Makefile:5280: warning: Neither INSTALLED_KERNEL_TARGET nor INSTALLED_BOOTIMAGE_TARGET is defined when PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS  is true. Information about the updated kernel cannot be built into OTA update package. You can fix this by: (1) setting TARGET_NO_KERNEL to false and installing the built kernel to out/target/product/generic/kernel, so that kernel information will be extracted from the built kernel; or (2) Add a prebuilt boot image and specify it in BOARD_PREBUILT_BOOTIMAGE; or (3) extracting kernel configuration and defining BOARD_KERNEL_CONFIG_FILE and BOARD_KERNEL_VERSION manually; or (4) unsetting PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS manually.
       > build/make/core/tasks/dex_preopt_check.mk:13: warning:  Missing compilation artifacts. Dexpreopting is not working for some system server jars. See https://cs.android.com/android/platform/superproject/+/master:build/make/core/tasks/README.dex_preopt_check.md
       > Offending entries:
       > system/framework/oat/arm/org.lineageos.platform.odex
       > system/framework/oat/arm/org.lineageos.platform.vdex
       > In file included from build/make/core/main.mk:1494:
       > In file included from build/make/core/Makefile:7695:
       > build/make/core/tasks/dex_preopt_check.mk:13: error: Build failed.
       > 18:46:51 ckati failed with: exit status 1
       For full logs, run 'nix log /nix/store/ysklg1pa18cqjnlhf21i7qfrcmi6i8af-robotnix-lineage_cheetah-2024060317.drv'.
error: 1 dependencies of derivation '/nix/store/bkhnbik6832pi7nbdzn6k1jn1h5q76ib-cheetah-factory-2024060317.zip.drv' failed to build

18:47:38
@erahhal:matrix.orgerahhalSeems related to the excluded kernel libs above?18:47:56
@atemu12:matrix.orgatemu12 erahhal: Does the kernel source for your device exist in source.dirs? 20:49:00
@erahhal:matrix.orgerahhal I guess this is where I admit I should know more about using a nix development environment. How do I see where the sources are pulled down? I've been testing this by creating a flake that pulls in my robotnix branch as an input then calls robotnixSystem 20:52:15
@erahhal:matrix.orgerahhalIt seems that it's putting sources into the nix store during build time, but otherwise I don't know20:52:39
@atemu12:matrix.orgatemu12It's actually constructing an android source tree in the build env20:53:05
@atemu12:matrix.orgatemu12You can check the source.dirs attribute for the paths that will be linked and their sources20:53:24
@erahhal:matrix.orgerahhalRight, how do I do that though 😅20:55:08
@erahhal:matrix.orgerahhalThis is sort of a complicated project to be diving into as someone not very experienced with Nix build environment heh. But I guess I'm the type to learn by jumping into the deep end of the pool 20:56:02
@erahhal:matrix.orgerahhal * This is sort of a complicated project to be diving into as someone not very experienced with Nix build environment heh. But I guess I'm the type to learn to swim by jumping into the deep end of the pool 20:56:35
@atemu12:matrix.orgatemu12You mean how to instrospect Nix values?20:56:54
@atemu12:matrix.orgatemu12 nix repl is a good start 20:56:55

Show newer messages


Back to Room ListRoom Version: 6