NixOS / nixos

OBSOLETE (go to NixOS/nixpkgs) - NixOS, a Linux distribution based on the Nix package manager - OBSOLETE (go to NixOS/nixpkgs)
MIT License
176 stars 102 forks source link

Raspberry Pi 1 a : hang during boot #309

Closed tobiasBora closed 7 years ago

tobiasBora commented 7 years ago

Hello,

I'm trying to run NixOs on the raspberry pi 1 model A. To do so I did these steps, following this guide https://nixos.wiki/wiki/NixOS_on_ARM:

1) Download sd-image-armv6l-linux.img from https://www.cs.helsinki.fi/u/tmtynkky/nixos-arm/installer/ 2) dd if=sd-image-armv6l-linux.img of=/dev/<my sd card> bs=4M && sync 3) Insert the SD card, and boot (I used UART to get the output)

What I get:

It hangs after a few seconds on the line Starting kernel .... Here are the logs:

USB0:   Core Release: 2.80a
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices... 1 Ethernet Device(s) found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
reading /extlinux/extlinux.conf
733 bytes read in 18 ms (39.1 KiB/s)
------------------------------------------------------------
1:      NixOS - Default
Enter choice: 1:        NixOS - Default
Retrieving file: /extlinux/../nixos/vs4vdabzclhlzpf6w9dmj9cwsmda29rr-initrd-initrd
reading /extlinux/../nixos/vs4vdabzclhlzpf6w9dmj9cwsmda29rr-initrd-initrd
4730873 bytes read in 365 ms (12.4 MiB/s)
Retrieving file: /extlinux/../nixos/2k2xk5ybq6rayzaj99gzyynz5ygw916w-linux-4.9.41-1.20170811-zImage
reading /extlinux/../nixos/2k2xk5ybq6rayzaj99gzyynz5ygw916w-linux-4.9.41-1.20170811-zImage
3894856 bytes read in 321 ms (11.6 MiB/s)
append: systemConfig=/nix/store/l6nfadx6pc7p069y3mkf49p3157i9hcb-nixos-system-nixos-18.03.git.66b63d2f5a init=/nix/store/l6nfadx6pc7p069y3mkf49p3157i9hcb-nixos-system-nixos-18.03.git.66b63d2f5a/init loglevel=4
Retrieving file: /extlinux/../nixos/2k2xk5ybq6rayzaj99gzyynz5ygw916w-linux-4.9.41-1.20170811-dtbs/bcm2835-rpi-b-rev2.dtb
reading /extlinux/../nixos/2k2xk5ybq6rayzaj99gzyynz5ygw916w-linux-4.9.41-1.20170811-dtbs/bcm2835-rpi-b-rev2.dtb
15197 bytes read in 42 ms (352.5 KiB/s)
Kernel image @ 0x1000000 [ 0x000000 - 0x3b6e48 ]
## Flattened Device Tree blob at 00000100
   Booting using the fdt blob at 0x000100
   reserving fdt memory region: addr=0 size=1000
   Using Device Tree in place at 00000100, end 00006c5c

Starting kernel ...

Did I miss something?

Thank you !

qknight commented 7 years ago

you should check https://www.google.de/search?q=hangs+after+Starting+kernel&oq=hangs+after+Starting+kernel&aqs=chrome..69i57j0l2.1296j0j7&sourceid=chrome&ie=UTF-8

this is really a common issue.

qknight commented 7 years ago

oh and you built the kernel yourself, right? then you could replace it by one you know it is working and check the config differences afterwards. maybe it is just the entry points...

tobiasBora commented 7 years ago

I finally found the solution, thanks to Dezgez on irc. You need to add at the end of the line that contains loglevel4 in the file /extlinux/extlinux.conf the text

console=ttyAMA0,115200n8

and then you can use UART. Sorry for that!

tobiasBora commented 7 years ago

@qknight I did not build the kernel, just used the default .img. But thank you for your help!