The officially official Devuan Forum!

You are not logged in.

#1 2019-07-05 06:36:57

therion23
Member
Registered: 2019-07-05
Posts: 3  

Devuan on Raspberry Pi 4

If you have a Pi 2 or 3 as well, the easiest way of making a bootable SD card for the Pi 4 is like this:

- Grab a Devuan image for Pi 2 (sorry, 32 bit only for now).
- Boot it on your Pi 2 or 3 and set up networking.
- From http://archive.raspberrypi.org/debian/p … -firmware/ get raspberrypi-bootloader and raspberrypi-kernel - make sure they have matching version numbers and not older than 20190620.
- From http://archive.raspberrypi.org/debian/p … e-nonfree/ get the latest firmware-brcm80211.
- install all three with dpkg.
- Double check your /boot/cmdline.txt - especially the root= setting.
- Reboot.

If it boots right, you should be running 4.19.50-v7l+. Shutdown, put the card into your Pi 4 and boot it up.

Now, if the screen blanks during boot on your Pi 4, it is most likely during switching framebuffers. In this case, wait a bit till you can log in via ssh, and as root, do:

echo blacklist vc4 > /etc/modprobe.d/blacklist-vc4.conf

And reboot. Solved the issue for me (HDMI - haven't tried the analogue output).

If you want the hardware specific bits (which usually live in /opt/vc), from the first URL above, get libraspberrypi0, libraspberrypi-bin and libraspberrypi-dev - all three the same version as the kernel and bootloader you got above! Install via dpkg and edit /etc/ld.so.conf.d/00-vmcs.conf to read this one line:

/opt/vc/lib

Run ldconfig or reboot.

Finally, update your system - but you know all about that already, right? :)

Caveat emptor - the above worked for me. Twice. Enjoy Devuan on your Pi 4!

Offline

#2 2019-11-23 20:38:27

tuxd3v
Member
Registered: 2019-11-14
Posts: 14  

Re: Devuan on Raspberry Pi 4

Hello therion23,
I tried with a Rpi1, compile a kernel, uboot, and try to boot the device..

I am stuck there..

On 'config.txt'
kernel=my-u-boot.bin

then created the boor.cmd, and scr script file, and I can boot the kernel..
The problem is that it hangs waiting for '/dev/mmbblk0p2'

So,
rpi1 execute:
1) - 'bootcode.bin', then bootcode.bin, reads 'config.txt', were it knows about my pseudo kernel( u-boot ) 'kernel=my-u-boot.bin'.
2) - It passes to VC4 to load 'start.elf'
3) - 'start.elf'( I believe ?! ) load my u-boot..
3) - my u-boot is loaded, which instructs to load the Real Kernel..

The problem... Kernel Hangs, waiting for '/dev/mmcblk0p2' sad

Here are the logs taken from ttyAMA0:

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,

Terminal ready
)
## Executing script at 02400000
## Error: Can't overwrite "ethaddr"
## Error inserting "ethaddr" variable, errno=1
switch to partitions #0, OK
mmc0 is current device
12655 bytes read in 9 ms (1.3 MiB/s)
4898976 bytes read in 221 ms (21.1 MiB/s)
Kernel image @ 0x008000 [ 0x000000 - 0x4ac0a0 ]
## Flattened Device Tree blob at 02600000
   Booting using the fdt blob at 0x2600000
   Using Device Tree in place at 02600000, end 0260616e

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.3.11 (tuxd3v@desktop0) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #10 Fri Nov 22 18:58:43 WET 2019
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi Model B
[    0.000000] Memory policy: Data cache writeback
[    0.000000] cma: Reserved 8 MiB at 0x0e800000
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 60900
[    0.000000] Kernel command line: earlyprintk=serial,ttyAMA0,115200 console=ttyAMA0,115200n8 console=tty1 root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4 elevator=noop fsck.repair=no smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 selinux=0 noinitrd
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 224072K/245760K available (6889K kernel code, 665K rwdata, 2188K rodata, 468K init, 781K bss, 13496K reserved, 8192K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] ftrace: allocating 24939 entries in 49 pages
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x2e8/0x518 with crng_init=0
[    0.000024] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[    0.000084] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[    0.000181] bcm2835: system timer (irq = 27)
[    0.000717] Console: colour dummy device 80x30
[    0.001220] printk: console [tty1] enabled
[    0.001315] Calibrating delay loop... 697.95 BogoMIPS (lpj=3489792)
[    0.050370] pid_max: default: 32768 minimum: 301
[    0.050974] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.051049] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.052850] CPU: Testing write buffer coherency: ok
[    0.054651] Setting up static identity map for 0x8200 - 0x8238
[    0.055914] devtmpfs: initialized
[    0.063740] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    0.064288] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.064380] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.065901] pinctrl core: initialized pinctrl subsystem
[    0.067862] NET: Registered protocol family 16
[    0.071960] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.076890] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    0.076971] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.077173] Serial: AMBA PL011 UART driver
[    0.119919] SCSI subsystem initialized
[    0.120275] usbcore: registered new interface driver usbfs
[    0.120432] usbcore: registered new interface driver hub
[    0.121020] usbcore: registered new device driver usb
[    0.123563] clocksource: Switched to clocksource timer
[    1.544513] VFS: Disk quotas dquot_6.6.0
[    1.544721] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.545158] FS-Cache: Loaded
[    1.545574] CacheFiles: Loaded
[    1.546008] simple-framebuffer f6fb000.framebuffer: framebuffer at 0xf6fb000, 0x300000 bytes, mapped to 0x(ptrval)
[    1.546090] simple-framebuffer f6fb000.framebuffer: format=a8r8g8b8, mode=1024x768x32, linelength=4096
[    1.572117] Console: switching to colour frame buffer device 128x48
[    1.595073] simple-framebuffer f6fb000.framebuffer: fb0: simplefb registered!
[    1.616069] thermal_sys: Registered thermal governor 'step_wise'
[    1.616929] NET: Registered protocol family 2
[    1.618970] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    1.619515] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    1.619977] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    1.620393] TCP: Hash tables configured (established 2048 bind 2048)
[    1.620926] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.621324] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.622195] NET: Registered protocol family 1
[    1.624019] RPC: Registered named UNIX socket transport module.
[    1.624377] RPC: Registered udp transport module.
[    1.624644] RPC: Registered tcp transport module.
[    1.635374] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.647450] hw perfevents: no irqs for PMU, sampling events not supported
[    1.658382] hw perfevents: enabled with armv6_1176 PMU driver, 3 counters available
[    1.672981] Initialise system trusted keyrings
[    1.684376] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    1.713463] FS-Cache: Netfs 'nfs' registered for caching
[    1.726013] NFS: Registering the id_resolver key type
[    1.736825] Key type id_resolver registered
[    1.747181] Key type id_legacy registered
[    1.757432] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.770306] Key type asymmetric registered
[    1.780643] Asymmetric key parser 'x509' registered
[    1.790870] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    1.801620] io scheduler mq-deadline registered
[    1.811990] io scheduler kyber registered
[    1.836484] bcm2835-rng 20104000.rng: hwrng registered
[    1.870326] brd: module loaded
[    1.896340] loop: module loaded
[    1.907862] Loading iSCSI transport class v2.0-870.
[    1.919594] usbcore: registered new interface driver smsc95xx
[    1.930373] usbcore: registered new interface driver usb-storage
[    1.941229] mousedev: PS/2 mouse device common for all mice
[    1.953892] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.965277] sdhci: Secure Digital Host Controller Interface driver
[    1.975797] sdhci: Copyright(c) Pierre Ossman
[    1.986095] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.997306] ledtrig-cpu: registered to indicate activity on CPUs
[    2.008264] hidraw: raw HID events driver (C) Jiri Kosina
[    2.018757] usbcore: registered new interface driver usbhid
[    2.028797] usbhid: USB HID core driver
[    2.039867] bcm2835-mbox 2000b880.mailbox: mailbox enabled
[    2.050636] Initializing XFRM netlink socket
[    2.060524] NET: Registered protocol family 17
[    2.070349] Key type dns_resolver registered
[    2.081652] registered taskstats version 1
[    2.091048] Loading compiled-in X.509 certificates
[    2.109931] 20201000.serial: ttyAMA0 at MMIO 0x20201000 (irq = 81, base_baud = 0) is a PL011 rev2
[    3.009889] random: fast init done
[    3.912321] printk: console [ttyAMA0] enabled
[    3.927686] raspberrypi-firmware soc:firmware: Attached to firmware from 2019-09-30 14:41
[    3.948148] vchiq: vchiq_init_state: slot_zero = (ptrval)
[    3.971479] Waiting for root device /dev/mmcblk0p2...
[  212.003677] random: crng init done

Can you see the amount of time it took to initialize rng?
Maybe I need to configure it.. don't know, but I already tried, without success..maybe I am doing something wrong..

The objective...
Get Rid of Every Blob RaspberryPi trows at it..
Till now I am unsuccessful on that sad

Have you any advice?

Thanks in Advance,
Best Regards,
tux


Best Regards,
tux

Offline

#3 2019-11-24 08:51:12

therion23
Member
Registered: 2019-07-05
Posts: 3  

Re: Devuan on Raspberry Pi 4

Hello!

I know terribly little about u-boot, however, i see no messages about mmc-bcm2835 and sdhost-bcm2835 (comparing with a Pi Zero here), so it really looks like a missing card reader driver to me.

Now, that delay i do know a little about, but no sureshot fix for it. It is something introduced with kernels 4.16 onwards (i believe), and related to how it gathers random data.

- Try installing haveged and reboot. It fixed things for some people (supposedly works without a hardware RNG).
- Try removing haveged, installing rng-tools and reboot. Fixed things for other people (supposedly requires a hardware RNG).
- Try removing rng-tools, plugging an 802.11 USB adapter and reboot. This fixed it for me on a Pi 2.

Let me know your results.

Offline

#4 2019-11-24 17:09:25

tuxd3v
Member
Registered: 2019-11-14
Posts: 14  

Re: Devuan on Raspberry Pi 4

therion23 wrote:

Hello!
I know terribly little about u-boot, however, i see no messages about mmc-bcm2835 and sdhost-bcm2835 (comparing with a Pi Zero here), so it really looks like a missing card reader driver to me.

Hello,
My kernel '.config'  is yet very crude.. and I trusted it too much( to bad for me..I paid the price ) sad

You were straight to the point smile
My rpi1B v1.0 is up and running smile
its consuming now 17MB of Ram..

So bootcode.bin->start.elf->u-boot-> real kernel.. smile

I still have some annoyances, the iface 'eth0' gets renamed to something very absurd..
and maybe I don't have yet all modules that I need enabled.. :S

For example the CPU Activity led, is only blinking, not reflecting the load, or processing my PI have..
I will recompile also a u-boot with support for HardFloat operations..

I still need to do a lot of checkings on it..

Now, that delay i do know a little about, but no sureshot fix for it. It is something introduced with kernels 4.16 onwards (i believe), and related to how it gathers random data.

- Try installing haveged and reboot. It fixed things for some people (supposedly works without a hardware RNG).
- Try removing haveged, installing rng-tools and reboot. Fixed things for other people (supposedly requires a hardware RNG).
- Try removing rng-tools, plugging an 802.11 USB adapter and reboot. This fixed it for me on a Pi 2.


The driver in Kernel 5.3.11, seems to be working now, about 14 seconds, a lot less from the 211 before.. but more checking is needed..

About rng-tools:
You can use in '/etc/default/rng-tools' a device like '/dev/urandom' it is the only way I could boot a 'Orange PI one Plus', because the TRNG hardware isn't yet supported( will be in kernel 5.4 I believe )..
You can try this solution has a last resort..

I will update, with my findings about what I could optimise smile
Thanks a lot to put me in the right track!!

Last edited by tuxd3v (2019-11-24 17:12:37)


Best Regards,
tux

Offline

#5 2019-11-24 17:37:19

therion23
Member
Registered: 2019-07-05
Posts: 3  

Re: Devuan on Raspberry Pi 4

This both explains and (hopefully) solves your eth0 issue: StackExchange link

This explains how to control the LEDs: Jeff Geerling's blog. Your options for triggers are:

gpio - controlled through GPIO (off by default)
heartbeat - heartbeat-like pulse
timer - pulse every second
input - under-voltage detection
mmc0 - memory I/O
cpu0 - CPU activity

Good luck!

Offline

#6 2019-12-08 18:49:52

tuxd3v
Member
Registered: 2019-11-14
Posts: 14  

Re: Devuan on Raspberry Pi 4

therion23 wrote:

This both explains and (hopefully) solves your eth0 issue: StackExchange link

This explains how to control the LEDs: Jeff Geerling's blog. Your options for triggers are:

gpio - controlled through GPIO (off by default)
heartbeat - heartbeat-like pulse
timer - pulse every second
input - under-voltage detection
mmc0 - memory I/O
cpu0 - CPU activity

Good luck!

Thanks!
I will try that, specially the the ACK les to 'cpu0' smile


Best Regards,
tux

Offline

Board footer