NixOS on Odroid U3

Moderators: mdrjr, odroid

NixOS on Odroid U3

Unread postby qknight » Tue Apr 07, 2015 7:02 pm

hi,

i started porting NixOS to the Odroid U3 board and i'm having problems compiling the kernel. all other stuff works so far:

1. source from here: https://github.com/qknight/nixpkgs/tree ... os_porting
2. a nix installation on odroid ubuntu 14.04
3. then use the source from (1.) with:
Code: Select all
 nix-build -A system /root/nixpkgs/nixpkgs/nixos


it builds 248 packages out of 250 and the problem seems to be the kernel nix expression, which might be incomplete or configured wrongly!

========================
now the question:
========================
following this guide: https://mescanef.net/blog/2014/12/custo ... ora-linux/ i adapted this kernel configuration:
https://github.com/qknight/nixpkgs/blob ... s.nix#L215
with this kernel:
Code: Select all
+  modDirVersion = "3.8.13.23";
+
+  src = fetchgit {
+    url = "https://github.com/hardkernel/linux.git";
+    rev = "611de8e983e24007598ca87cb0060b5412f97e43";
+    sha256 = "09jdzkpqfmnpz4i974p4vy84489wmkl5yq5rawhqwg1i2alas58s";
+ # this rev is pointing to the 3.8.y kernel
+  };


https://lastlog.de/misc/odroid_u3_nix-b ... -build-log
https://lastlog.de/misc/odroid_u3_nix-b ... -3.8.13.23

error message, excerpt from the console-build-log above:
Code: Select all
  WRAP    arch/arm/include/generated/asm/resource.h
  WRAP    arch/arm/include/generated/asm/sections.h
  WRAP    arch/arm/include/generated/asm/segment.h
  WRAP    arch/arm/include/generated/asm/sembuf.h
  WRAP    arch/arm/include/generated/asm/serial.h
  WRAP    arch/arm/include/generated/asm/shmbuf.h
  WRAP    arch/arm/include/generated/asm/siginfo.h
  WRAP    arch/arm/include/generated/asm/sizes.h
  WRAP    arch/arm/include/generated/asm/socket.h
  WRAP    arch/arm/include/generated/asm/sockios.h
  WRAP    arch/arm/include/generated/asm/termbits.h
  WRAP    arch/arm/include/generated/asm/termios.h
  WRAP    arch/arm/include/generated/asm/timex.h
  WRAP    arch/arm/include/generated/asm/trace_clock.h
  WRAP    arch/arm/include/generated/asm/types.h
  WRAP    arch/arm/include/generated/asm/unaligned.h
/nix/tmp/nix-build-linux-3.8.13.23.drv-2/linux-611de8e/drivers/gpu/arm/mali/Kbuild:34: *** Runtime PM is incompatible with non-GPL license.  Stop.
/nix/tmp/nix-build-linux-3.8.13.23.drv-2/linux-611de8e/scripts/Makefile.modbuiltin:54: recipe for target 'drivers/gpu/arm/mali' failed
make[4]: *** [drivers/gpu/arm/mali] Error 2
/nix/tmp/nix-build-linux-3.8.13.23.drv-2/linux-611de8e/scripts/Makefile.modbuiltin:54: recipe for target 'drivers/gpu/arm' failed
make[3]: *** [drivers/gpu/arm] Error 2
make[3]: *** Waiting for unfinished jobs....
/nix/tmp/nix-build-linux-3.8.13.23.drv-2/linux-611de8e/scripts/Makefile.modbuiltin:54: recipe for target 'drivers/gpu' failed
make[2]: *** [drivers/gpu] Error 2
/nix/tmp/nix-build-linux-3.8.13.23.drv-2/linux-611de8e/Makefile:964: recipe for target 'drivers/modules.builtin' failed
make[1]: *** [drivers/modules.builtin] Error 2
make[1]: *** Waiting for unfinished jobs....
Makefile:130: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
note: keeping build directory ‘/nix/tmp/nix-build-linux-3.8.13.23.drv-2’
builder for ‘/nix/store/l9k5vyyfjvf3n0rz1gg140qidxlbanyj-linux-3.8.13.23.drv’ failed with exit code 2
cannot build derivation ‘/nix/store/9jk055b5azhljgj550yazwhwx0kj4bv3-nixos-15.05pre-git.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/9jk055b5azhljgj550yazwhwx0kj4bv3-nixos-15.05pre-git.drv’ failed


so what am i doing wrong here? what is the open source driver and what is the proprietary product? i've been reading into /nix/tmp/nix-build-linux-3.8.13.23.drv-2/linux-611de8e/drivers/gpu/arm/mali/Kbuild but the file does not make sense for me:

https://github.com/corbamico/mali_drm/b ... ter/Kbuild

if one wants to build it on nixos, you can do it like this:
-> one can build the kernel directly using it's attribute path (not the name):
Code: Select all
nix-shell -I $NIXPKGS -A linux_odroid_u


hope someone can help me,
best wishes,
qknight
qknight
 
Posts: 7
Joined: Tue Apr 07, 2015 6:35 am
languages_spoken: english
ODROIDs: xu4

Re: NixOS on Odroid U3

Unread postby mescanef » Fri Apr 17, 2015 3:16 am

Hi,

In mali's header, for testing try to find and set:
#define MALI_LICENSE_IS_GPL 1

or remove pm runtime.
see reference: http://irclog.whitequark.org/teamhacksung/2013-05-18

Regards,
mescanef
mescanef
 
Posts: 17
Joined: Sat Jul 05, 2014 9:41 pm
languages_spoken: english
ODROIDs: U3

Re: NixOS on Odroid U3

Unread postby qknight » Tue Mar 22, 2016 10:07 pm

never seen your remark as i didn't get a notification that you posted something to this thread.
IIRC i got it compiling now but i don't know what i changed in order to get it working.

thanks for your help!
qknight
 
Posts: 7
Joined: Tue Apr 07, 2015 6:35 am
languages_spoken: english
ODROIDs: xu4


Return to Other OS

Who is online

Users browsing this forum: No registered users and 3 guests