Re: [Nix-dev] Raspberry-Pi NixOS

2016-07-27 Thread Tuomas Tynkkynen
Hi,

There are both binaries+images and documentation at
https://nixos.org/wiki/NixOS_on_ARM.
Yeah, still pending the migration to the manual...

2016-07-21 15:47 GMT+03:00 Rok Garbas :
> sry i only have questions in this email :)
>
>
> - how would we speed up building? so that other can get binaries at
> least for the "base" of the nixos.
>
> - would we just hook up rpi's into hydra? can we hook this to existing
> hydra.nixos.org or we would have to come with our own hydra.
>
> - can we also collect this knowledge in some kind of manual, be it
> part of nixos manual or completely separated.
>
> - i'm still waiting for my rpi3 to arrive, but where can i help until
> then? i'd love to have proper support for rpi in nixpkgs.
>
>
>
> On Wed, Jul 20, 2016 at 12:05 AM, Lluís Batlle i Rossell
>  wrote:
>> On Tue, Jul 19, 2016 at 11:53:59PM +0200, Tomas Hlavaty wrote:
>>> Lluís Batlle i Rossell  writes:
>>> > The device tree blob should be built by the kernel, like with pi and pi2,
>>> > isn't it?
>>>
>>> This is the kernel which works for me and is taken from
>>> raspberry-firmware/boot:
>>>
>>> Linux version 4.4.13-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3
>>> (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #894 SMP Mon Jun 13
>>> 13:13:27 BST 2016
>>>
>>> and the corresponding device tree is bcm2710-rpi-3-b.dtb.
>>>
>>> This looks like the same kernel version in
>>> pkgs/os-specific/linux/kernel/linux-rpi.nix (modDirVersion = "4.4.13";
>>> tag = "1.20160620-1")
>>>
>>> Are you saying that this is not good enough?
>>>
>>> What works: If I copy files from raspberry-firmware/boot to /boot, rpi3
>>> starts fine.  These are the files I have in /boot:
>>>
>>> $ ls -al /boot
>>> -rwxr-xr-x  1 root root   13221 Jun 18 22:31 bcm2708-rpi-b.dtb
>>> -rwxr-xr-x  1 root root   13484 Jun 18 22:31 bcm2708-rpi-b-plus.dtb
>>> -rwxr-xr-x  1 root root   13257 Jun 18 22:31 bcm2708-rpi-cm.dtb
>>> -rwxr-xr-x  1 root root   14567 Jun 18 22:31 bcm2709-rpi-2-b.dtb
>>> -rwxr-xr-x  1 root root   15237 Jun 18 22:31 bcm2710-rpi-3-b.dtb
>>> -rwxr-xr-x  1 root root   17932 Jun 18 22:31 bootcode.bin
>>> -rwxr-xr-x  1 root root 165 Jul 19 22:46 cmdline.txt
>>> -rwxr-xr-x  1 root root1369 Jan 11  2016 config.txt
>>> -rwxr-xr-x  1 root root2504 Jun 23 20:42 fixup_cd.dat
>>> -rwxr-xr-x  1 root root6482 Jun 23 20:42 fixup.dat
>>> -rwxr-xr-x  1 root root9717 Jun 23 20:42 fixup_db.dat
>>> -rwxr-xr-x  1 root root9717 Jun 23 20:42 fixup_x.dat
>>> -rwxr-xr-x  1 root root 4224232 Jun 18 22:31 kernel7.img
>>> drwxr-xr-x  2 root root8192 Jun 18 22:31 overlays
>>> -rwxr-xr-x  1 root root  617432 Jun 23 20:42 start_cd.elf
>>> -rwxr-xr-x  1 root root 4926264 Jun 23 20:42 start_db.elf
>>> -rwxr-xr-x  1 root root 2746552 Jun 23 20:42 start.elf
>>> -rwxr-xr-x  1 root root 3877720 Jun 23 20:42 start_x.elf
>>>
>>> I don't see, why raspberrypi/builder.sh creates defaultgeneration,
>>> initrd and nixos-init files in /boot.  It actually seems to me, that
>>> initrd should not be there at all for the boot to work.
>>>
>>> raspberrypi/builder.sh doesn't create fixup_x.dat, which is in the list
>>> above; but I haven't tried booting without it.
>>>
>>> Although pkgs/os-specific/linux/kernel/linux-rpi.nix copies DTB files,
>>> it renames them to something that looks wrong and also it does not copy
>>> them to /boot at all:
>>>
>>> # I am not sure if all of these are correct...
>>> copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-a.dtb
>>> copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b.dtb
>>> copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b-rev2.dtb
>>> copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-a-plus.dtb
>>> copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-b-plus.dtb
>>> copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-zero.dtb
>>> copyDTB bcm2708-rpi-cm.dtb bcm2835-rpi-cm.dtb
>>> copyDTB bcm2709-rpi-2-b.dtb bcm2836-rpi-2-b.dtb
>>> copyDTB bcm2710-rpi-3-b.dtb bcm2837-rpi-3-b.dtb
>>>
>>> I looks like the files in raspberry-firmware/boot should work on any rpi
>>> version so we should probably immitate that somehow in nixos and at
>>> least get it to work out of the box even if we just take the precompiled
>>> files from raspberrypi-firmware/boot and improve that later.
>>
>> I don't remember any of the details. I'm using it in rpi2 just fine. I
>> could forget some file, and I may have written code that is fit just for a
>> very specific kernel version. Maybe it has all changed in 4.4.
>>
>> The relevant detail that I remember is that the kernel recipe is told to
>> build the DTB, so I think that you should not need any dtb from the
>> firmwarefiles/boot.
>>
>> Regards,
>> Lluís.
>>
>> --
>> (Escriu-me xifrat si saps PGP / Write ciphered if you know PGP)
>> PGP key D4831A8A - https://emailselfdefense.fsf.org/
>> ___
>> nix-dev mailing list
>> nix-dev@lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
>
> --
> Rok 

Re: [Nix-dev] Raspberry-Pi NixOS

2016-07-27 Thread Tuomas Tynkkynen
2016-07-20 0:53 GMT+03:00 Tomas Hlavaty :
> Lluís Batlle i Rossell  writes:
>> The device tree blob should be built by the kernel, like with pi and pi2,
>> isn't it?
>
> This is the kernel which works for me and is taken from
> raspberry-firmware/boot:
>
> Linux version 4.4.13-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3
> (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #894 SMP Mon Jun 13
> 13:13:27 BST 2016
>
> and the corresponding device tree is bcm2710-rpi-3-b.dtb.
>
> This looks like the same kernel version in
> pkgs/os-specific/linux/kernel/linux-rpi.nix (modDirVersion = "4.4.13";
> tag = "1.20160620-1")
>
> Are you saying that this is not good enough?
>
> What works: If I copy files from raspberry-firmware/boot to /boot, rpi3
> starts fine.  These are the files I have in /boot:
>
> $ ls -al /boot
> -rwxr-xr-x  1 root root   13221 Jun 18 22:31 bcm2708-rpi-b.dtb
> -rwxr-xr-x  1 root root   13484 Jun 18 22:31 bcm2708-rpi-b-plus.dtb
> -rwxr-xr-x  1 root root   13257 Jun 18 22:31 bcm2708-rpi-cm.dtb
> -rwxr-xr-x  1 root root   14567 Jun 18 22:31 bcm2709-rpi-2-b.dtb
> -rwxr-xr-x  1 root root   15237 Jun 18 22:31 bcm2710-rpi-3-b.dtb
> -rwxr-xr-x  1 root root   17932 Jun 18 22:31 bootcode.bin
> -rwxr-xr-x  1 root root 165 Jul 19 22:46 cmdline.txt
> -rwxr-xr-x  1 root root1369 Jan 11  2016 config.txt
> -rwxr-xr-x  1 root root2504 Jun 23 20:42 fixup_cd.dat
> -rwxr-xr-x  1 root root6482 Jun 23 20:42 fixup.dat
> -rwxr-xr-x  1 root root9717 Jun 23 20:42 fixup_db.dat
> -rwxr-xr-x  1 root root9717 Jun 23 20:42 fixup_x.dat
> -rwxr-xr-x  1 root root 4224232 Jun 18 22:31 kernel7.img
> drwxr-xr-x  2 root root8192 Jun 18 22:31 overlays
> -rwxr-xr-x  1 root root  617432 Jun 23 20:42 start_cd.elf
> -rwxr-xr-x  1 root root 4926264 Jun 23 20:42 start_db.elf
> -rwxr-xr-x  1 root root 2746552 Jun 23 20:42 start.elf
> -rwxr-xr-x  1 root root 3877720 Jun 23 20:42 start_x.elf
>
> I don't see, why raspberrypi/builder.sh creates defaultgeneration,
> initrd and nixos-init files in /boot.  It actually seems to me, that
> initrd should not be there at all for the boot to work.
>
> raspberrypi/builder.sh doesn't create fixup_x.dat, which is in the list
> above; but I haven't tried booting without it.
>
> Although pkgs/os-specific/linux/kernel/linux-rpi.nix copies DTB files,
> it renames them to something that looks wrong and also it does not copy
> them to /boot at all:
>
> # I am not sure if all of these are correct...
> copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-a.dtb
> copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b.dtb
> copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b-rev2.dtb
> copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-a-plus.dtb
> copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-b-plus.dtb
> copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-zero.dtb
> copyDTB bcm2708-rpi-cm.dtb bcm2835-rpi-cm.dtb
> copyDTB bcm2709-rpi-2-b.dtb bcm2836-rpi-2-b.dtb
> copyDTB bcm2710-rpi-3-b.dtb bcm2837-rpi-3-b.dtb
>

The files are getting copied with the names used by the mainline
kernel (which is currently the authority for naming/schema of device
tree files) since U-Boot is looking for those names.

> I looks like the files in raspberry-firmware/boot should work on any rpi
> version so we should probably immitate that somehow in nixos and at
> least get it to work out of the box even if we just take the precompiled
> files from raspberrypi-firmware/boot and improve that later.

I personally wouldn't use device trees not built from the kernel tree that
is being used, unless I wanted to have weird and interesting problems.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-07-21 Thread Rok Garbas
sry i only have questions in this email :)


- how would we speed up building? so that other can get binaries at
least for the "base" of the nixos.

- would we just hook up rpi's into hydra? can we hook this to existing
hydra.nixos.org or we would have to come with our own hydra.

- can we also collect this knowledge in some kind of manual, be it
part of nixos manual or completely separated.

- i'm still waiting for my rpi3 to arrive, but where can i help until
then? i'd love to have proper support for rpi in nixpkgs.



On Wed, Jul 20, 2016 at 12:05 AM, Lluís Batlle i Rossell
 wrote:
> On Tue, Jul 19, 2016 at 11:53:59PM +0200, Tomas Hlavaty wrote:
>> Lluís Batlle i Rossell  writes:
>> > The device tree blob should be built by the kernel, like with pi and pi2,
>> > isn't it?
>>
>> This is the kernel which works for me and is taken from
>> raspberry-firmware/boot:
>>
>> Linux version 4.4.13-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3
>> (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #894 SMP Mon Jun 13
>> 13:13:27 BST 2016
>>
>> and the corresponding device tree is bcm2710-rpi-3-b.dtb.
>>
>> This looks like the same kernel version in
>> pkgs/os-specific/linux/kernel/linux-rpi.nix (modDirVersion = "4.4.13";
>> tag = "1.20160620-1")
>>
>> Are you saying that this is not good enough?
>>
>> What works: If I copy files from raspberry-firmware/boot to /boot, rpi3
>> starts fine.  These are the files I have in /boot:
>>
>> $ ls -al /boot
>> -rwxr-xr-x  1 root root   13221 Jun 18 22:31 bcm2708-rpi-b.dtb
>> -rwxr-xr-x  1 root root   13484 Jun 18 22:31 bcm2708-rpi-b-plus.dtb
>> -rwxr-xr-x  1 root root   13257 Jun 18 22:31 bcm2708-rpi-cm.dtb
>> -rwxr-xr-x  1 root root   14567 Jun 18 22:31 bcm2709-rpi-2-b.dtb
>> -rwxr-xr-x  1 root root   15237 Jun 18 22:31 bcm2710-rpi-3-b.dtb
>> -rwxr-xr-x  1 root root   17932 Jun 18 22:31 bootcode.bin
>> -rwxr-xr-x  1 root root 165 Jul 19 22:46 cmdline.txt
>> -rwxr-xr-x  1 root root1369 Jan 11  2016 config.txt
>> -rwxr-xr-x  1 root root2504 Jun 23 20:42 fixup_cd.dat
>> -rwxr-xr-x  1 root root6482 Jun 23 20:42 fixup.dat
>> -rwxr-xr-x  1 root root9717 Jun 23 20:42 fixup_db.dat
>> -rwxr-xr-x  1 root root9717 Jun 23 20:42 fixup_x.dat
>> -rwxr-xr-x  1 root root 4224232 Jun 18 22:31 kernel7.img
>> drwxr-xr-x  2 root root8192 Jun 18 22:31 overlays
>> -rwxr-xr-x  1 root root  617432 Jun 23 20:42 start_cd.elf
>> -rwxr-xr-x  1 root root 4926264 Jun 23 20:42 start_db.elf
>> -rwxr-xr-x  1 root root 2746552 Jun 23 20:42 start.elf
>> -rwxr-xr-x  1 root root 3877720 Jun 23 20:42 start_x.elf
>>
>> I don't see, why raspberrypi/builder.sh creates defaultgeneration,
>> initrd and nixos-init files in /boot.  It actually seems to me, that
>> initrd should not be there at all for the boot to work.
>>
>> raspberrypi/builder.sh doesn't create fixup_x.dat, which is in the list
>> above; but I haven't tried booting without it.
>>
>> Although pkgs/os-specific/linux/kernel/linux-rpi.nix copies DTB files,
>> it renames them to something that looks wrong and also it does not copy
>> them to /boot at all:
>>
>> # I am not sure if all of these are correct...
>> copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-a.dtb
>> copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b.dtb
>> copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b-rev2.dtb
>> copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-a-plus.dtb
>> copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-b-plus.dtb
>> copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-zero.dtb
>> copyDTB bcm2708-rpi-cm.dtb bcm2835-rpi-cm.dtb
>> copyDTB bcm2709-rpi-2-b.dtb bcm2836-rpi-2-b.dtb
>> copyDTB bcm2710-rpi-3-b.dtb bcm2837-rpi-3-b.dtb
>>
>> I looks like the files in raspberry-firmware/boot should work on any rpi
>> version so we should probably immitate that somehow in nixos and at
>> least get it to work out of the box even if we just take the precompiled
>> files from raspberrypi-firmware/boot and improve that later.
>
> I don't remember any of the details. I'm using it in rpi2 just fine. I
> could forget some file, and I may have written code that is fit just for a
> very specific kernel version. Maybe it has all changed in 4.4.
>
> The relevant detail that I remember is that the kernel recipe is told to
> build the DTB, so I think that you should not need any dtb from the
> firmwarefiles/boot.
>
> Regards,
> Lluís.
>
> --
> (Escriu-me xifrat si saps PGP / Write ciphered if you know PGP)
> PGP key D4831A8A - https://emailselfdefense.fsf.org/
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev



-- 
Rok Garbas
https://garbas.si
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-07-19 Thread Lluís Batlle i Rossell
On Tue, Jul 19, 2016 at 11:53:59PM +0200, Tomas Hlavaty wrote:
> Lluís Batlle i Rossell  writes:
> > The device tree blob should be built by the kernel, like with pi and pi2,
> > isn't it?
> 
> This is the kernel which works for me and is taken from
> raspberry-firmware/boot:
> 
> Linux version 4.4.13-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3
> (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #894 SMP Mon Jun 13
> 13:13:27 BST 2016
> 
> and the corresponding device tree is bcm2710-rpi-3-b.dtb.
> 
> This looks like the same kernel version in
> pkgs/os-specific/linux/kernel/linux-rpi.nix (modDirVersion = "4.4.13";
> tag = "1.20160620-1")
> 
> Are you saying that this is not good enough?
> 
> What works: If I copy files from raspberry-firmware/boot to /boot, rpi3
> starts fine.  These are the files I have in /boot:
> 
> $ ls -al /boot
> -rwxr-xr-x  1 root root   13221 Jun 18 22:31 bcm2708-rpi-b.dtb
> -rwxr-xr-x  1 root root   13484 Jun 18 22:31 bcm2708-rpi-b-plus.dtb
> -rwxr-xr-x  1 root root   13257 Jun 18 22:31 bcm2708-rpi-cm.dtb
> -rwxr-xr-x  1 root root   14567 Jun 18 22:31 bcm2709-rpi-2-b.dtb
> -rwxr-xr-x  1 root root   15237 Jun 18 22:31 bcm2710-rpi-3-b.dtb
> -rwxr-xr-x  1 root root   17932 Jun 18 22:31 bootcode.bin
> -rwxr-xr-x  1 root root 165 Jul 19 22:46 cmdline.txt
> -rwxr-xr-x  1 root root1369 Jan 11  2016 config.txt
> -rwxr-xr-x  1 root root2504 Jun 23 20:42 fixup_cd.dat
> -rwxr-xr-x  1 root root6482 Jun 23 20:42 fixup.dat
> -rwxr-xr-x  1 root root9717 Jun 23 20:42 fixup_db.dat
> -rwxr-xr-x  1 root root9717 Jun 23 20:42 fixup_x.dat
> -rwxr-xr-x  1 root root 4224232 Jun 18 22:31 kernel7.img
> drwxr-xr-x  2 root root8192 Jun 18 22:31 overlays
> -rwxr-xr-x  1 root root  617432 Jun 23 20:42 start_cd.elf
> -rwxr-xr-x  1 root root 4926264 Jun 23 20:42 start_db.elf
> -rwxr-xr-x  1 root root 2746552 Jun 23 20:42 start.elf
> -rwxr-xr-x  1 root root 3877720 Jun 23 20:42 start_x.elf
> 
> I don't see, why raspberrypi/builder.sh creates defaultgeneration,
> initrd and nixos-init files in /boot.  It actually seems to me, that
> initrd should not be there at all for the boot to work.
> 
> raspberrypi/builder.sh doesn't create fixup_x.dat, which is in the list
> above; but I haven't tried booting without it.
> 
> Although pkgs/os-specific/linux/kernel/linux-rpi.nix copies DTB files,
> it renames them to something that looks wrong and also it does not copy
> them to /boot at all:
> 
> # I am not sure if all of these are correct...
> copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-a.dtb
> copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b.dtb
> copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b-rev2.dtb
> copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-a-plus.dtb
> copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-b-plus.dtb
> copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-zero.dtb
> copyDTB bcm2708-rpi-cm.dtb bcm2835-rpi-cm.dtb
> copyDTB bcm2709-rpi-2-b.dtb bcm2836-rpi-2-b.dtb
> copyDTB bcm2710-rpi-3-b.dtb bcm2837-rpi-3-b.dtb
> 
> I looks like the files in raspberry-firmware/boot should work on any rpi
> version so we should probably immitate that somehow in nixos and at
> least get it to work out of the box even if we just take the precompiled
> files from raspberrypi-firmware/boot and improve that later.

I don't remember any of the details. I'm using it in rpi2 just fine. I
could forget some file, and I may have written code that is fit just for a
very specific kernel version. Maybe it has all changed in 4.4.

The relevant detail that I remember is that the kernel recipe is told to
build the DTB, so I think that you should not need any dtb from the
firmwarefiles/boot.

Regards,
Lluís.

-- 
(Escriu-me xifrat si saps PGP / Write ciphered if you know PGP)
PGP key D4831A8A - https://emailselfdefense.fsf.org/
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-07-19 Thread Tomas Hlavaty
Lluís Batlle i Rossell  writes:
> The device tree blob should be built by the kernel, like with pi and pi2,
> isn't it?

This is the kernel which works for me and is taken from
raspberry-firmware/boot:

Linux version 4.4.13-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3
(crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #894 SMP Mon Jun 13
13:13:27 BST 2016

and the corresponding device tree is bcm2710-rpi-3-b.dtb.

This looks like the same kernel version in
pkgs/os-specific/linux/kernel/linux-rpi.nix (modDirVersion = "4.4.13";
tag = "1.20160620-1")

Are you saying that this is not good enough?

What works: If I copy files from raspberry-firmware/boot to /boot, rpi3
starts fine.  These are the files I have in /boot:

$ ls -al /boot
-rwxr-xr-x  1 root root   13221 Jun 18 22:31 bcm2708-rpi-b.dtb
-rwxr-xr-x  1 root root   13484 Jun 18 22:31 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x  1 root root   13257 Jun 18 22:31 bcm2708-rpi-cm.dtb
-rwxr-xr-x  1 root root   14567 Jun 18 22:31 bcm2709-rpi-2-b.dtb
-rwxr-xr-x  1 root root   15237 Jun 18 22:31 bcm2710-rpi-3-b.dtb
-rwxr-xr-x  1 root root   17932 Jun 18 22:31 bootcode.bin
-rwxr-xr-x  1 root root 165 Jul 19 22:46 cmdline.txt
-rwxr-xr-x  1 root root1369 Jan 11  2016 config.txt
-rwxr-xr-x  1 root root2504 Jun 23 20:42 fixup_cd.dat
-rwxr-xr-x  1 root root6482 Jun 23 20:42 fixup.dat
-rwxr-xr-x  1 root root9717 Jun 23 20:42 fixup_db.dat
-rwxr-xr-x  1 root root9717 Jun 23 20:42 fixup_x.dat
-rwxr-xr-x  1 root root 4224232 Jun 18 22:31 kernel7.img
drwxr-xr-x  2 root root8192 Jun 18 22:31 overlays
-rwxr-xr-x  1 root root  617432 Jun 23 20:42 start_cd.elf
-rwxr-xr-x  1 root root 4926264 Jun 23 20:42 start_db.elf
-rwxr-xr-x  1 root root 2746552 Jun 23 20:42 start.elf
-rwxr-xr-x  1 root root 3877720 Jun 23 20:42 start_x.elf

I don't see, why raspberrypi/builder.sh creates defaultgeneration,
initrd and nixos-init files in /boot.  It actually seems to me, that
initrd should not be there at all for the boot to work.

raspberrypi/builder.sh doesn't create fixup_x.dat, which is in the list
above; but I haven't tried booting without it.

Although pkgs/os-specific/linux/kernel/linux-rpi.nix copies DTB files,
it renames them to something that looks wrong and also it does not copy
them to /boot at all:

# I am not sure if all of these are correct...
copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-a.dtb
copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b.dtb
copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b-rev2.dtb
copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-a-plus.dtb
copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-b-plus.dtb
copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-zero.dtb
copyDTB bcm2708-rpi-cm.dtb bcm2835-rpi-cm.dtb
copyDTB bcm2709-rpi-2-b.dtb bcm2836-rpi-2-b.dtb
copyDTB bcm2710-rpi-3-b.dtb bcm2837-rpi-3-b.dtb

I looks like the files in raspberry-firmware/boot should work on any rpi
version so we should probably immitate that somehow in nixos and at
least get it to work out of the box even if we just take the precompiled
files from raspberrypi-firmware/boot and improve that later.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-07-18 Thread Lluís Batlle i Rossell
The device tree blob should be built by the kernel, like with pi and pi2,
isn't it?

Regards,
Lluís.


On Mon, Jul 18, 2016 at 10:40:09PM +0200, Tomas Hlavaty wrote:
> 
> Tomas Hlavaty  writes:
> > - pkgs/os-specific/linux/firmware/raspberrypi/default.nix needs newer
> >   rev as the current one is pre-rpi3.
> >
> > - pkgs/os-specific/linux/kernel/linux-rpi.nix needs newer kernel,
> >   probably for the same reason as above.  I tried 4.4.13-v7.
> 
> Tuomas Tynkkynen has done that already and looking at the git log, he's
> progressed quite far.
> 
> commit 36f4a8a485732da98e1fcf40945ecda305677579
> Author: Tuomas Tynkkynen 
> Date:   Sun Jun 19 22:49:36 2016 +0300
> 
> sd-image-armv7l-multiplatform.nix: Preliminary Raspberry Pi 2/3 support
> 
> - RPi3 successfully gets to U-Boot, but then fails to boot the kernel
>   due to a missing device tree file. This should get added to the 4.8
>   kernel release once this patch is merged: 
> https://lkml.org/lkml/2016/6/1/841
> - RPi2 is not tested, but it should successfully boot the NixOS image.
> 
> Could not the device tree be taken from
> raspberrypifw/boot/bcm2710-rpi-3-b.dtb?
> 
> I will build nixpkgs HEAD, lets see.
> 
> Tomas
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev

-- 
(Escriu-me xifrat si saps PGP / Write ciphered if you know PGP)
PGP key D4831A8A - https://emailselfdefense.fsf.org/
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-07-18 Thread Tomas Hlavaty

Tomas Hlavaty  writes:
> - pkgs/os-specific/linux/firmware/raspberrypi/default.nix needs newer
>   rev as the current one is pre-rpi3.
>
> - pkgs/os-specific/linux/kernel/linux-rpi.nix needs newer kernel,
>   probably for the same reason as above.  I tried 4.4.13-v7.

Tuomas Tynkkynen has done that already and looking at the git log, he's
progressed quite far.

commit 36f4a8a485732da98e1fcf40945ecda305677579
Author: Tuomas Tynkkynen 
Date:   Sun Jun 19 22:49:36 2016 +0300

sd-image-armv7l-multiplatform.nix: Preliminary Raspberry Pi 2/3 support

- RPi3 successfully gets to U-Boot, but then fails to boot the kernel
  due to a missing device tree file. This should get added to the 4.8
  kernel release once this patch is merged: 
https://lkml.org/lkml/2016/6/1/841
- RPi2 is not tested, but it should successfully boot the NixOS image.

Could not the device tree be taken from
raspberrypifw/boot/bcm2710-rpi-3-b.dtb?

I will build nixpkgs HEAD, lets see.

Tomas
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-07-13 Thread Tomas Hlavaty
Hi Anders,

Anders Lundstedt  writes:
> Has anyone successfully installed NixOS on a Raspberry Pi 3?

I am running nixos-version 16.09.git.a5559f5 (Flounder).

I have rpi2 running nixos which I installed as described in the wiki and
then managed to upgrade in a few steps up to the nixos-version
16.09.git.8376694M (Emu).  It runs hydra 
which is kind of blocking me from upgrading further without spending too
much time on it.

Then I cloned this rpi2 sd card and copied into /boot files from the
boot directory in .  With the
new /boot and old / from rpi2, rpi3 boots and works fine.

So far I need to copy the /boot data manually after each nixos-rebuild
switch.

Now I'd like to port nixpkgs for rpi3 so that nixos-rebuild switch
generates correct /boot data.  Unfortunatelly, I don't know how to do it
(yet?) and nixos-rebuild build-vm has been running for a second day so
the progress is very slow.

> On Fri, Jun 17, 2016 at 9:35 AM, Tuomas Tynkkynen
>  wrote:
>> Though the ARMv7 image listed there doesn't have the necessary RPi bootloader
>> things added - that's not hard to add but I don't have a board to test with.
>
> How do I add the "bootloader things"? I do not know much about these
> things but I have a Raspberry Pi 3 and with some further instructions
> and/or pointers I think I could give it a try.

My guess:

- pkgs/os-specific/linux/firmware/raspberrypi/default.nix needs newer
  rev as the current one is pre-rpi3.

- pkgs/os-specific/linux/kernel/linux-rpi.nix needs newer kernel,
  probably for the same reason as above.  I tried 4.4.13-v7.

The above changes did compile but rpi3 did not boot.

I still need to change boot.* in /etc/nixos/configuration.nix but i have
no idea how.  We need something like rpi2.nix in
 but for rpi3.  I have no
idea how the guys came up with that stuff, e.g. boot.kernelParams or
what should happen with boot.loader.raspberryPi.version for example.

One more thing.  As I already have hydra on rpi2, I should add a job to
build armv7l image to make it easier for people to bootstrap the latest
nixos.  What nixpkgs attribute will do that?  Does somebody know?  At
least generating the rootfs would be a good start.

Hope it helps.  Please let us know if you move it forward.

Tomas
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-07-13 Thread Anders Lundstedt
Has anyone successfully installed NixOS on a Raspberry Pi 3?


On Fri, Jun 17, 2016 at 9:35 AM, Tuomas Tynkkynen
 wrote:
> That page is quite old, https://nixos.org/wiki/NixOS_on_ARM has some
> newer stuff.
> Though the ARMv7 image listed there doesn't have the necessary RPi bootloader
> things added - that's not hard to add but I don't have a board to test with.

How do I add the "bootloader things"? I do not know much about these
things but I have a Raspberry Pi 3 and with some further instructions
and/or pointers I think I could give it a try.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-06-17 Thread Tuomas Tynkkynen
2016-06-15 15:01 GMT+03:00 Matthias Beyer :
> Hi viric,
> Hi dezgeg,
>
> I just found the wiki page on nixos on the raspberry[0], where you two are
> referenced as creators.

That page is quite old, https://nixos.org/wiki/NixOS_on_ARM has some
newer stuff.
Though the ARMv7 image listed there doesn't have the necessary RPi bootloader
things added - that's not hard to add but I don't have a board to test with.

> May I ask whether this is still present? I plan on buying a Raspberry Pi model
> B, 3rd generation and build a small handheld linux terminal (see [1]) with it,
> but I really want to run nixos on it and be able to deploy software for it 
> from
> my other devices (mainly because of recompilation times - or are there a 
> nixpkgs
> substitutes for ARM available?).

There are a couple of packages and installation images getting
regularly built (on
master / nixos-unstable) and hosted on an university server.

> So my question is basically: Is this article still relevant to the current
> situation, as the article is almost one year old?
>

The problem is probably that https://nixos.org/wiki/Raspberry_Pi_2 has
a Nix that is too old to evaluate current Nixpkgs (as someone else mentioned
downthread, which makes things slightly tricky.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-06-15 Thread Jeffrey David Johnson
I tried a few months ago and wasn't able to get it working. It runs, but
I wasn't able to upgrade Nix. May have been a temporary problem fixed in
recent versions though.
Jeff

On Wed, 15 Jun 2016 15:19:19 +0200
Matthias Beyer  wrote:

> On 15-06-2016 14:52:22, Lluís Batlle i Rossell wrote:
> > I use nixos in the pi2 since pre-15.09. Now with 16.03.
> 
> That sounds awesome, so I guess it is not that hard to set up.
> 
> Are there substitutes available or do you use the raspberry itself or some 
> other
> machine to build packages for ARM?
> 
> > 
> > On Wed, Jun 15, 2016 at 02:26:51PM +0200, Bas van Dijk wrote:
> > > LumiGuide [...] NixOS like all our other machines.
> 
> Sounds like a nice place to work at! :-)
> 
> -- 
> Mit freundlichen Grüßen,
> Kind regards,
> Matthias Beyer
> 
> Proudly sent with mutt.
> Happily signed with gnupg.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-06-15 Thread Matthias Beyer
On 15-06-2016 14:52:22, Lluís Batlle i Rossell wrote:
> I use nixos in the pi2 since pre-15.09. Now with 16.03.

That sounds awesome, so I guess it is not that hard to set up.

Are there substitutes available or do you use the raspberry itself or some other
machine to build packages for ARM?

> 
> On Wed, Jun 15, 2016 at 02:26:51PM +0200, Bas van Dijk wrote:
> > LumiGuide [...] NixOS like all our other machines.

Sounds like a nice place to work at! :-)

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-06-15 Thread Lluís Batlle i Rossell
Go ahead.

I use nixos in the pi2 since pre-15.09. Now with 16.03.

On Wed, Jun 15, 2016 at 02:26:51PM +0200, Bas van Dijk wrote:
> I'm also really interested in getting NixOS to run on Raspberry-Pi 2/3. At
> LumiGuide we have many Raspberry Pi's deployed in the field running Debian.
> It would be great to replace that with NixOS like all our other machines.
> Op 15 jun. 2016 2:01 p.m. schreef "Matthias Beyer" :
> 
> > Hi viric,
> > Hi dezgeg,
> >
> > I just found the wiki page on nixos on the raspberry[0], where you two are
> > referenced as creators.
> >
> > May I ask whether this is still present? I plan on buying a Raspberry Pi
> > model
> > B, 3rd generation and build a small handheld linux terminal (see [1]) with
> > it,
> > but I really want to run nixos on it and be able to deploy software for it
> > from
> > my other devices (mainly because of recompilation times - or are there a
> > nixpkgs
> > substitutes for ARM available?).
> >
> > So my question is basically: Is this article still relevant to the current
> > situation, as the article is almost one year old?
> >
> > Of course I will document my experience and share it with the NixOS
> > community
> > after I created the device.
> >
> > [0]: https://nixos.org/wiki/Raspberry_Pi_2
> > [1]:
> > http://makezine.com/projects/build-raspberry-pi-powered-linux-laptop-that-fits-your-pocket/
> >
> > --
> > Mit freundlichen Grüßen,
> > Kind regards,
> > Matthias Beyer
> >
> > Proudly sent with mutt.
> > Happily signed with gnupg.
> >
> > ___
> > nix-dev mailing list
> > nix-dev@lists.science.uu.nl
> > http://lists.science.uu.nl/mailman/listinfo/nix-dev
> >
> >

-- 
(Escriu-me xifrat si saps PGP / Write ciphered if you know PGP)
PGP key D4831A8A - https://emailselfdefense.fsf.org/
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-06-15 Thread Bas van Dijk
I'm also really interested in getting NixOS to run on Raspberry-Pi 2/3. At
LumiGuide we have many Raspberry Pi's deployed in the field running Debian.
It would be great to replace that with NixOS like all our other machines.
Op 15 jun. 2016 2:01 p.m. schreef "Matthias Beyer" :

> Hi viric,
> Hi dezgeg,
>
> I just found the wiki page on nixos on the raspberry[0], where you two are
> referenced as creators.
>
> May I ask whether this is still present? I plan on buying a Raspberry Pi
> model
> B, 3rd generation and build a small handheld linux terminal (see [1]) with
> it,
> but I really want to run nixos on it and be able to deploy software for it
> from
> my other devices (mainly because of recompilation times - or are there a
> nixpkgs
> substitutes for ARM available?).
>
> So my question is basically: Is this article still relevant to the current
> situation, as the article is almost one year old?
>
> Of course I will document my experience and share it with the NixOS
> community
> after I created the device.
>
> [0]: https://nixos.org/wiki/Raspberry_Pi_2
> [1]:
> http://makezine.com/projects/build-raspberry-pi-powered-linux-laptop-that-fits-your-pocket/
>
> --
> Mit freundlichen Grüßen,
> Kind regards,
> Matthias Beyer
>
> Proudly sent with mutt.
> Happily signed with gnupg.
>
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-06-15 Thread Lluís Batlle i Rossell
I don't know about the article... but I still use a pi2 as my main home
server, with nixos, with 16.03.

On Wed, Jun 15, 2016 at 02:01:06PM +0200, Matthias Beyer wrote:
> Hi viric,
> Hi dezgeg,
> 
> I just found the wiki page on nixos on the raspberry[0], where you two are
> referenced as creators.
> 
> May I ask whether this is still present? I plan on buying a Raspberry Pi model
> B, 3rd generation and build a small handheld linux terminal (see [1]) with it,
> but I really want to run nixos on it and be able to deploy software for it 
> from
> my other devices (mainly because of recompilation times - or are there a 
> nixpkgs
> substitutes for ARM available?).
> 
> So my question is basically: Is this article still relevant to the current
> situation, as the article is almost one year old?
> 
> Of course I will document my experience and share it with the NixOS community
> after I created the device.
> 
> [0]: https://nixos.org/wiki/Raspberry_Pi_2
> [1]: 
> http://makezine.com/projects/build-raspberry-pi-powered-linux-laptop-that-fits-your-pocket/
> 
> -- 
> Mit freundlichen Grüßen,
> Kind regards,
> Matthias Beyer
> 
> Proudly sent with mutt.
> Happily signed with gnupg.



-- 
(Escriu-me xifrat si saps PGP / Write ciphered if you know PGP)
PGP key D4831A8A - https://emailselfdefense.fsf.org/
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Raspberry-Pi NixOS

2016-06-15 Thread Matthias Beyer
Hi viric,
Hi dezgeg,

I just found the wiki page on nixos on the raspberry[0], where you two are
referenced as creators.

May I ask whether this is still present? I plan on buying a Raspberry Pi model
B, 3rd generation and build a small handheld linux terminal (see [1]) with it,
but I really want to run nixos on it and be able to deploy software for it from
my other devices (mainly because of recompilation times - or are there a nixpkgs
substitutes for ARM available?).

So my question is basically: Is this article still relevant to the current
situation, as the article is almost one year old?

Of course I will document my experience and share it with the NixOS community
after I created the device.

[0]: https://nixos.org/wiki/Raspberry_Pi_2
[1]: 
http://makezine.com/projects/build-raspberry-pi-powered-linux-laptop-that-fits-your-pocket/

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.


signature.asc
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev