:: Re: [DNG] [SOLVED] Devuan on Raspbe…
Top Page
Delete this message
Reply to this message
Author: Dr. Nikolaus Klepp
Date:  
To: dng
Subject: Re: [DNG] [SOLVED] Devuan on RaspberryPi W Zero segfaults
Am Samstag, 27. Oktober 2018 schrieb Arnt Karlsen:
> On Sat, 27 Oct 2018 13:46:02 +0200, Dr. wrote in message
> <201810271346.02978.dr.klepp@???>:
>
> > Am Freitag, 26. Oktober 2018 schrieb Gregory Nowak:
> > > [...]
> > > The bottom line for you is that since the rpi0 doesn't have a built
> > > in bluetooth adapter, the serial port in devuan will be on
> > > /dev/ttyAMA0. That means you need to specify that as the serial port
> > > in cmdline.txt, and spin up agetty on that port in /etc/inittab.
> > >
> > > Greg
> >
> > This actually pointed in the right diection. Here is how to get
> > DEVUAN + UART + WIFI wirking on the RPiW0:
> >
> > First thing to notice is that brcmfmac43430-sdio is not initialized
> > correctly on the RPiW0. This reults in "agatty /dev/ttyAMA0" to fail.
> > To correctly initialize brcmfmac43430-sdio two files are needed:
> > "brcmfmac43430-sdio.txt" and "brcmfmac43430-sdio.bin". The first is
> > missing in the devuan image.
> >
> > I copied both files from raspbian over to devuan, together with
> > "wpa_supplicat.conf". Then changed interfaces (deactivate eth0,
> > activate wlan0), rebooted. Now I can ssh into devuan on RPiW0 *hurray*
> >
> > Here's a working /etc/wpa_supplicant/wpa_supplicant.conf:
> >
> >     ctrl_interface=/var/run/wpa_supplicant
> >     ap_scan=1
> >     network={
> >         key_mgmt=WPA-PSK
> >         ssid="GIVEMYNAME"
> >         psk=HEREKOMESTHEPASSWORD"
> >     }

> >
> >
> > Now this is half way to a working solution: I still need a serial
> > console. "enable_uart=1" in "config.txt" works on raspbian, why not
> > on devuan? (2 blinks, then darkness). I thought a firmare upgrade
> > would solve this: I copied "raspi-config" from raspbian (it requires
> > binutils to be installed) and ran the update. This bumps kernel from
> > 4.14.44 to 4.14.78 (not much, bit it also solves the
> > "shutdown-reboot-loop" for RPi3+, too) and updates the bootloader and
> > firmware.
>
> ..keep in mind Raspian Jessie onwards are doing things the systemd way.
> Look for advice on Raspian Wheezy to find useful stuff.


That old stuff has a lot of dust on it and mostly works for rpi0 but not rpiw0. As I dug deeper, it turned out that the whole raspbian stuff was built with a hot needle. Some things work as documented, most don't. Systemd playes a major role as system-obfucator :-(

>
> ..do you have a working serial console on GPIO pins?


Yes, I have - see the lines below :-) Now I don't have bluetooth, but as I have no bt-device to takt, that's not a big loss. I think the pi3-miniuart-bt would give me BT back, but I prefer it disabled.

> > Next step: get the UART working. As it turn out, "enable_uart=1"
> > reliably breaks booting - don't know why that works in raspbian. The
> > link UART->BT is broken by loading the "pi3-disable-bt" on the rpiw0.
> > So adding "dtoverlay=pi3-disable-bt" to "config.txt" eables UART.
> >
> > Now I have a working RPiW0 with UART + WIFI. USB-OTG with serial is
> > the next thing: Add "dtoverlay=dwc2" to "config.txt" and
> > "modules-load=dwc2,g_serial" to "cmdline.txt". Reboot and surprise:
> > No serial over USB. Kernelmodule dwc2 is loaded, gserial is not. On
> > raspbian bith modules are loaded. Loding by hand actually works and
> > gives serial over USB.
> >
> > Now only 2 questions remain:
> > - Why does "modules-load=dwc2,g_serial" not load g_serial?
> > - "cmdline.txt" on raspbian says "dwc_otg.lpm_enable=0", on devuan
> > "dwc_otg.fiq_fix_enable=2". What does this mean?
> >
> > Nik
>
> ..one _big_mess_: https://duckduckgo.com/?q=dwc_otg&ia=web
> https://ideechaniz.wordpress.com/2014/02/26/dwc-otg-drivers/
>
> ..appearantly you are supposed to be able to do "enable_uart=1"-like
> things in systemd with iwc_otg, _Play_Around_ and tell us what you
> _discover_.


What I have seen till now directs me to the conclustion that these setting are for the old dwc-otg kernelmodule, not for the new dwc2, so they are utterly useless. But I could be totally wrong here.

Oh, it looks like the rpi0 works just fine as a usb-composite-device.

Nik




--
Please do not email me anything that you are not comfortable also sharing with the NSA, CIA ...