Giter VIP home page Giter VIP logo

raspi3-image-spec's Introduction

Raspberry Pi Debian images

This project has moved!

Please go to Debian's salsa service, as this project is now hosted there:

https://salsa.debian.org/raspi-team/image-specs

We will work on migrating (and addressing, of course) the open issues as well.

raspi3-image-spec's People

Contributors

a3nm avatar chschlue avatar dijumx avatar gfa avatar gwolf avatar liwfi avatar praseodym avatar stapelberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raspi3-image-spec's Issues

No /usr/sbin in path when building image using proposed method

I tried to build an image using the method proposed in the README (Option 2). However, vmdb2 failed: "FileNotFoundError: [Errno 2] No such file or directory: 'parted': 'parted'" because there was no /usr/sbin in the $PATH variable expanded before env is called.
The solution is to manually add /usr/sbin and /sbin:

sudo  env -i LC_CTYPE=C.UTF-8 PATH="/usr/sbin:/sbin:$PATH" ./vmdb2/vmdb2 --output raspi3.img raspi3.yaml --log raspi3.log

This should probably be mentioned in the README.

WiFi found but not working on model B

Using 02/06/2019 image. Everything works except WFi. wlan0 is found but is not ready. Dmesg gives:

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 4.19.0-2-arm64 ([email protected]) (gcc version 8.2.0 (Debian 8.2.0-14)) #1 SMP Debian 4.19.16-1 (2019-01-17)
[ 0.000000] Machine model: Raspberry Pi 3 Model B Rev 1.2

[ 10.776637] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ 10.792392] usbcore: registered new interface driver brcmfmac
[ 10.826500] brcmfmac mmc1:0001:1: firmware: direct-loading firmware brcm/brcmfmac43430-sdio.bin
[ 10.843859] brcmfmac mmc1:0001:1: firmware: direct-loading firmware brcm/brcmfmac43430-sdio.txt

[ 10.993330] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ 11.003658] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 11.018653] brcmfmac mmc1:0001:1: firmware: failed to load brcm/brcmfmac43430-sdio.clm_blob (-2)
[ 11.048062] firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
[ 11.064338] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.clm_blob failed with error -2
[ 11.081444] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[ 11.103587] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f

Thanks

Required packages?

On a fresh Buster amd64 host in addition to git you also need the debootstrap (for qemu-debootstrap) & dosfstools (for mkfs.vfat) packages.

eroors on image creation

Troubles at image creation:

1. creating from GIT snapshots
I used suggestion:
"Due to a missing feature https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763419 on snapshots, to make the build work, you have to disable an expiration check by APT. To do so, edit raspi3.yaml to replace all apt-get invocations with apt-get -o Acquire::Check-Valid-Until=false"
But regardless of that I saw that apt-get ... returns sources are expired.
Why

cliapp.app.AppException: Command failed: chroot /tmp/tmp0lbjnh9o apt-get update b'Hit:1
http://snapshot.debian.org/archive/debian/20180930T210043Z buster InRelease\nReading package
 lists
...
Release file for http://snapshot.debian.org/archive/debian/20180930T210043Z/dists/buster/InRelease
 is expired (invalid since 19d 10h 25min 17s). Updates for this repository will not be applied.
\n' 2018-10-27 08:58:11 INFO 
Something went wrong, cleaning up!

2. creating from regular Testing (buster) distribution, leave raspi3.yaml as it is

ERROR: Command failed: chroot /tmp/tmppkxavdv_ sh -c echo 'deb http://deb.debian.org/debian 
unstable main contrib non-free' >> /etc/apt/sources.list
...
Setting up raspi3-firmware (1.20180619-1) ...\nReading package lists...\nBuilding dependency 
tree...\nReading state information...\n' b"debconf: unable to initialize frontend: 
Dialog\ndebconf: (TERM is not set, so the dialog frontend is not usable.)\ndebconf: falling 
back to frontend: Readline\ndebconf: unable to initialize frontend: Readline\ndebconf: 
(Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module)
 (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.26.2 /usr/local/share/perl/5.26.2
 /usr/lib/aarch64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl/5.26
 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/aarch64-linux-gnu/perl-base) at
 /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7, <> line 1.)\ndebconf: falling back to
 frontend: Teletype\nE: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such
 device)\n/usr/bin/ls: cannot access '/boot/vmlinuz-*': No such file or directory\nraspi3-firmware:
 no kernel found in /boot/vmlinuz-*, cannot populate /boot/firmware\nE: Unable to locate package
 linux-image-4.18.0-rc5-arm64-unsigned\nE: Couldn't find any package by glob
 'linux-image-4.18.0-rc5-arm64-unsigned'\nE: Couldn't find any package by regex
 'linux-image-4.18.0-rc5-arm64-unsigned'\n" Something went wrong, cleaning up! Exec: 
['umount', '/tmp/tmppkxavdv_/.//boot/firmware']

Please be so kind to help me.

Best regards,

Zdenko Dolar

Missing SPI support

SPI is not available since SPIDEV is not compiled into the kernel:

config-4.18.0-rc4-arm64:

# CONFIG_SPI_SPIDEV is not set

Document the firewall rules that disallow remote SSH connections?

Hi,

I was trying to log into my Raspberry Pi remotely via SSH and it didn't work, and it took me some time that what prevented it were some iptables rules:

> sudo iptables -L INPUT
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  127.0.0.0/8          anywhere             /* RFC3330 loopback */
ACCEPT     all  --  10.0.0.0/8           anywhere             /* RFC1918 reserved */
ACCEPT     all  --  172.16.0.0/12        anywhere             /* RFC1918 reserved */
ACCEPT     all  --  192.168.0.0/16       anywhere             /* RFC1918 reserved */
ACCEPT     all  --  169.254.0.0/16       anywhere             /* RFC3927 link-local */
REJECT     tcp  --  anywhere             anywhere             tcp dpt:ssh /* SSH */ reject-with icmp-port-unreachable

> sudo ip6tables -L INPUT
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all      localhost            anywhere             /* RFC3513 loopback */
ACCEPT     all      fc00::/7             anywhere             /* RFC4193 reserved */
ACCEPT     all      fe80::/10            anywhere             /* RFC4291 link-local */
REJECT     tcp      anywhere             anywhere             tcp dpt:ssh /* SSH */ reject-with icmp6-port-unreachable

I agree it makes a lot of sense to have these rules, because the initial password is easy to guess. However don't you think it would be a good idea to advertise the existence of these rules to the user, in README.md or in the motd?

Unable to boot on Rpi 3 model B

I have tried both the pre-built image and building my own image using this tool. I have tried flashing using both Etcher and dd, but nothing I do seems to result in a bootable image.

What happens when I plug my Pi in is the red light comes on and the amber light flashes for about a second, then turns red. There is no HDMI output or network connectivity. Flashing a Raspbian image works as expected.

QT says Could not initialize GLX

Hi,

I've install Debian image on my RPI3 to use QT webengine. My custom application don't start and I also tested Qutebrowser. This one is also not working. Both of them have following error
Could not initialize GLX

I thinks this is related to GLX and EGLFS of QT5 on RPI. I've added dtoverlay=vc4-fkms-v4d to \boot\config.txt to make sure that OpenGL is enabled. I also have installed mesa-utils and can run glxgears successfully.

I don't know any tool to investigate such bugs, so please help me to investigate this issue more effectively.

Thanks,
Abbas

Error on image creation (ERROR expected str, bytes or os.PathLike object, not NoneType)

raspi3.log

OS: Debian buster, i'm using the original raspi3.yaml available on repository (updated to today, no other mods). The image is created but i noticed that it does not contains "/etc" folder.

2019-01-22 16:48:11 ERROR expected str, bytes or os.PathLike object, not NoneType
Traceback (most recent call last):
File "/home/developer/debian_rasp_build/raspi3-image-spec/vmdb2-master/vmdb/app.py", line 107, in run_steps_helper
method(step, self.settings, state)
File "/home/developer/debian_rasp_build/raspi3-image-spec/vmdb2-master/vmdb/plugins/mkfs_plugin.py", line 51, in run
vmdb.runcmd(cmd)
File "/home/developer/debian_rasp_build/raspi3-image-spec/vmdb2-master/vmdb/runcmd.py", line 53, in runcmd
return cliapp.runcmd(argv, *argvs, **kwargs)
File "/usr/lib/python3/dist-packages/cliapp/runcmd.py", line 55, in runcmd
exit_code, out, err = runcmd_unchecked(argv, *args, **kwargs)
File "/usr/lib/python3/dist-packages/cliapp/runcmd.py", line 106, in runcmd_unchecked
kwargs)
File "/usr/lib/python3/dist-packages/cliapp/runcmd.py", line 143, in _build_pipeline
stderr=stderr, close_fds=True, **kwargs)
File "/usr/lib/python3.7/subprocess.py", line 775, in init
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1453, in _execute_child
restore_signals, start_new_session, preexec_fn)
TypeError: expected str, bytes or os.PathLike object, not NoneType

WiFi: missing regulatory.db and problematic txpower

On boot we can see that the regulatory.db is missing and cannot be loaded. I couldn't find it in any debian package.

[   10.197170] platform regulatory.0: firmware: failed to load regulatory.db (-2)
[   10.207175] firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
[   10.207200] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[   10.207213] cfg80211: failed to load regulatory.db

Nevertheless I can set the regulatory domain through hostapds country setting.

# iw reg get
global
country DE: DFS-ETSI
	(2400 - 2483 @ 40), (N/A, 20), (N/A)
	(5150 - 5250 @ 80), (N/A, 20), (N/A), NO-OUTDOOR, AUTO-BW
	(5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
	(5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
	(5725 - 5875 @ 80), (N/A, 13), (N/A)
	(57000 - 66000 @ 2160), (N/A, 40), (N/A)

But apparently it doesn't honor the 20 dBm txpower limit.

# iw dev
phy#0
	Interface wlan0
		ifindex 3
		wdev 0x1
		addr b8:27:eb:bb:b3:d0
		ssid foobar
		type AP
		channel 5 (2432 MHz), width: 20 MHz, center1: 2432 MHz
		txpower 31.00 dBm

Setting a txpower limit via ìw sets txpower to 0.0 dBm.

# iw dev wlan0 set txpower fixed 20
# iw dev
phy#0
	Interface wlan0
		ifindex 3
		wdev 0x1
		addr b8:27:eb:bb:b3:d0
		ssid foobar
		type AP
		channel 5 (2432 MHz), width: 20 MHz, center1: 2432 MHz
		txpower 0.00 dBm

So I revert it back to iw dev wlan0 set txpower auto and it's back up at 31 dBm.

What seems to work is setting the txpower through iwconfig, which uses ioctls instead of netlink.

# iwconfig wlan0 txpower 20
# iw dev
phy#0
	Interface wlan0
		ifindex 3
		wdev 0x1
		addr b8:27:eb:bb:b3:d0
		ssid foobar
		type AP
		channel 5 (2432 MHz), width: 20 MHz, center1: 2432 MHz
		txpower 20.00 dBm

I verified that the signal strength changes considerably between auto (31 dBm) and fixed 20 (0 dBm) and it's not just a visual glitch. Setting the txpower through iwconfig works just fine, just not through iw.

Built my own image; FS is not resized to fill card

I'm not sure if the images built is supposed to autoreize, but it did not in my case at least.

NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0     179:0    0 14.9G  0 disk 
|-mmcblk0p1 179:1    0  299M  0 part /boot/firmware
`-mmcblk0p2 179:2    0  1.2G  0 part /

What do I do to resize it now, and how do I make future images to auto resize?

Unable to use GPIO

Using this image, Python and sysfs access to the GPIO pins is unavailable. When using Python3 the following happens:

$ sudo python3 bcs.py 
Traceback (most recent call last):
  File "bcs.py", line 18, in <module>
    import RPi.GPIO as GPIO
  File "/usr/lib/python3/dist-packages/RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!

And using sysfs:

$ sudo -i
# echo "4" > /sys/class/gpio/export
-bash: echo: write error: Invalid argument

vmdb2 seems to have removed apt runner

$ sudo env -i LC_CTYPE=C.UTF-8 PATH="/usr/sbin:/sbin:$PATH" \
>     ./vmdb2/vmdb2 --output raspi3.img raspi3.yaml --log raspi3.log
ERROR: No runner implements step with keys apt, packages

Perhaps related to #47, after merging #48, I'm faced with the above error. According to vmdb2 README , the plugin directory is supposed to have runners like apt, but the directory itself is gone.

Do we need to move all commands to the shell runner?

Frequent hangs of graphical sessions ("[drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA")

Graphical (e.g. X11) sessions are frequently hanging on my Raspberry Pi 3B+: I can move the cursor around on the screen, but the GUI is otherwise unresponsive. The system appears to be otherwise in a reasonable state because I can still log in on another virtual console or by SSH. However, the only way to get X11 back seems to be rebooting.

Just after a hang, I will find that the kernel has written messages like this:

[38025.733857] alloc_contig_range: [3a600, 3adbc) PFNs busy
[38028.099564] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
[38028.099612] [drm]                            V3D: 104748kb BOs (69)
[38028.099623] [drm]                     V3D shader:    156kb BOs (39)
[38028.099633] [drm]                           dumb:   8148kb BOs (4)
[38028.099678] [drm]                total purged BO:  21360kb BOs (19)
[38028.099701] vc4_v3d 3fc00000.v3d: Failed to allocate memory for tile binning: -12. You may need to enable CMA or give it more memory.
[38045.339458] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
[38045.339600] [drm]                         kernel:     32kb BOs (1)
[38045.339612] [drm]                            V3D: 105444kb BOs (69)
[38045.339622] [drm]                     V3D shader:    156kb BOs (39)
[38045.339632] [drm]                           dumb:   8148kb BOs (4)
[38045.339802] [drm]                total purged BO:  37992kb BOs (26)
[38045.340340] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
[38045.340373] [drm]                            V3D: 104724kb BOs (68)
[38045.340384] [drm]                     V3D shader:    156kb BOs (39)
[38045.340393] [drm]                           dumb:   8148kb BOs (4)
[38045.340404] [drm]             userspace BO cache:     32kb BOs (1)
[38045.340414] [drm]                total purged BO:  37992kb BOs (26)
[38052.297331] alloc_contig_range: [34100, 34180) PFNs busy

The hangs seem to be correlated with opening up a web browser, but sometimes they just happen with the passage of time. I have tried setting cma=128M or cma=256M in /boot/firmware/cmdline.txt, and that helps a little but does not make the hangs go away.

To try to keep graphics use as lightweight as possible, I have ditched LXDE/XFCE/MATE and Firefox, and I am instead using i3 and surf. Again, that helps a little bit, but not much. The last hang occurred when I had 4 xterms and one surf window open (browsing GitHub).

I have tried making both armhf and arm64 images. The hangs are much more frequent on arm64.

Raspberry Pi 3 B+ incompatibilities

I was trying to use your build image from January 2018 on my Raspberry Pi 3 B+.

Simply putting the image on a USB stick and trying it did not work. I see the red LED, then the green LED blink, and then the green LED enter a loop state with 4 long pulse followed by 4 short pulse.

I've tried to edit the config.txt file to change the device tree entry to bcm2837-rpi-3-b-plus.dtb and duplicated the existing bcm2837-rpi-3-b.dtb as bcm2837-rpi-3-b-plus.dtb (simply cp to the new name), as suggested for Fedora 28 beta. But I end up in the same error.

I wanted to regenerate the image because perhaps the uboot needs an update, but I do not manage to build it on my platform (see #11). Would you have any advice on how to proceed?

Does WiFi work for anyone?

I installed your image in november, when we still had to drop the .txt file into the firmware directory. I'm not sure if WiFi worked back then. At least it hasn't been working this year for me.

I have wpa-supplicant running, therefore the dmesg regularly shows scan errors:

[470588.124437] brcmfmac: brcmf_do_escan: error (-110)
[470588.143795] brcmfmac: brcmf_cfg80211_scan: scan error (-110)
[470591.708470] brcmfmac: brcmf_do_escan: error (-110)
[470591.727822] brcmfmac: brcmf_cfg80211_scan: scan error (-110)
[470595.292465] brcmfmac: brcmf_do_escan: error (-110)
[470595.311820] brcmfmac: brcmf_cfg80211_scan: scan error (-110)
[470598.876516] brcmfmac: brcmf_do_escan: error (-110)
[470598.895875] brcmfmac: brcmf_cfg80211_scan: scan error (-110)
[470602.460511] brcmfmac: brcmf_do_escan: error (-110)
[470602.479881] brcmfmac: brcmf_cfg80211_scan: scan error (-110)

Commands involving the wlan0 interface are sluggish and timeout

# ip link set up dev wlan0
# dmesg -c
[470798.558989] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110
[470798.594003] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[470801.117704] brcmfmac: _brcmf_set_multicast_list: Setting mcast_list failed, -110
[470806.237724] brcmfmac: brcmf_set_wpa_version: set wpa_auth failed (-110)
[470806.263071] brcmfmac: brcmf_cfg80211_connect: wl_set_wpa_version failed (-110)
[470808.797740] brcmfmac: _brcmf_set_multicast_list: Setting allmulti failed, -110
[470811.357752] brcmfmac: brcmf_cfg80211_set_power_mgmt: error (-110)
[470813.917761] brcmfmac: _brcmf_set_multicast_list: Setting BRCMF_C_SET_PROMISC failed, -110
[470816.477769] brcmfmac: _brcmf_set_multicast_list: Setting mcast_list failed, -110
# iwconfig wlan0 ESSID darmstadt.freifunk.net
Error for wireless request "Set ESSID" (8B1A) :
    SET failed on device wlan0 ; Connection timed out.
# dmesg -c
[470920.670390] brcmfmac: _brcmf_set_multicast_list: Setting mcast_list failed, -110
[470923.230398] brcmfmac: _brcmf_set_multicast_list: Setting allmulti failed, -110
[470925.790421] brcmfmac: _brcmf_set_multicast_list: Setting BRCMF_C_SET_PROMISC failed, -110
[470950.623194] brcmfmac: brcmf_set_wpa_version: set wpa_auth failed (-110)
[470950.649466] brcmfmac: brcmf_cfg80211_connect: wl_set_wpa_version failed (-110)
# dpkg -l | grep firmware
ii  firmware-brcm80211            20170823-1                     all          Binary firmware for Broadcom 802.11 wireless cards
ii  firmware-linux-free           3.4                            all          Binary firmware for various drivers in the Linux kernel
ii  raspi3-firmware               1.20171201-4                   arm64        Raspberry Pi 2 and 3 GPU firmware and bootloaders
# uname -rv
4.14.0-3-arm64 #1 SMP Debian 4.14.17-1 (2018-02-14)

Image created based on stretch gets APT::Default-Release error

Out of curiosity, I basically replaced all instances of buster on raspi3.yaml and build an image. It booted successfully, even the wpa_cli issue of the pre-built image is present.

But trying to apt install results in error:

E: The value 'stretch' is invalid for APT::Default-Release as such a release is not available in the sources

I thought the error is because of replacing buster on raspi3.yaml, but replacing stretch with buster on /etc/apt/apt.conf.d/08default-release resulted in the same error with stretch swapped out for buster. Replaced it with stable and testing for same results.

Not booting (or booting without network) with linux-image-4.18

Thanks for your work I really appreciate to run a "real" Debian on my Pi3. Everything worked smooth for me so far but since I upgraded the kernel to 4.18 it is either not booting or not bringing up the network as I can neither ping the Pi nor SSH to it. Is there any known issue?
Maybe I find some time to connect it to a TV and keyboard and investigate this issue this weekend. Any hints where to look for the root cause beside the obvious like the syslog?

Cannot resolve user name systemd-timesync: No such process

On a fresh install, systemd-timesyncd failed to start with

Dec 14 22:42:10 rpi3 systemd-timesyncd[24567]: Cannot resolve user name systemd-timesync: No such process

Creating that user fixed the issue. It would be good if that user would exist from the get-go :)

Image fails to reach login

I have tried building an image with an unmodifed raspi3.yaml file. Booting with just HDMI and usb keyboard connected.
The image works, insofar as the pi accepts the image, and starts to boot; but it stops when it reaches random: crng init done. Picture
Unplugging the keyboard causes additional lines to be printed on the screen, but there is nothing else.

  • Is the image set up for ssh login only?
  • How does one enable the "standard" login?
  • Are only logins via UART (e.g. via a PiUART) enabled?
  • If this type of feature needs an extra package, which one is it?

Wi-Fi Interface disappeared after sudden reboot

Problem

After entering the DTB files in the firmware directory, everything was fine and the wireless interfaces worked perfectly. Yesterday evening the electric power went out for ~2 hours and, when the board restarted, wlan0 disappeared. After several reboots the situation is unchanged, even though the driver brcmfmac is in memory and is in use.

Details

  • The Ethernet and local interfaces are fully functional, the problem concerns only the wireless interfaces;
  • Apparently the kernel ring buffer does not contain any information useful for diagnosing the problem;
  • /boot/firmware contains only two DTB files, the firmware configuration for boot and some kernel binaries.

Related to: #37

on which platform to carry out

HI!

Sorry, but from the text here I can not guess, on which platform this manual must be executed?
Image created is for ARM64, in text are "apt install". Confused: if I'm creating an image from packages installed, this means, that the system is already installed and I'm logged in. If this is not correct, the installed packages (apt install) are not for arm64 and will not work there.
So what existed first, egg or chicken?
Please uncover the above secret.
My posibilities are ARM32 raspbian or Slackware64 on Intel. If needed, I can install Virtualbox Debian machine on Intel platform.

Hardly waiting for the answer.

Best regards,

Zdenko

Configure WiFi the same way as debian-installer

On regular systems, providing WiFi info during installation will automatically let Debian connect when the the installation is done and the system rebooted. This applies to headless non-GUI systems too.

I know couple of ways to make it connect to WiFi over the command line, but I want the new image to connect to WiFi by default instead of having me to connect it to ssh or plug in monitors and keyboards to configure WiFi every time.

Basically, I want to know how debian-installer does it so I can have it done in advance with the .yaml if possible.

error on image creation

When running the line "sudo env -i LC_CTYPE=C.UTF-8 PATH="/usr/sbin:/sbin:$PATH" ./vmdb2/vmdb2 --output raspi3.img raspi3.yaml --log raspi3.log", I get:

"ERROR: No runner implements step with keys fs-type, start, mkpart, part-tag, end, device"

Seems to come from the class NoMatchingRunner from vmdb2/vmdb/step_list.py. I tried with an older version (e.g., commit 284f789) and got the same error.

I am on Debian Stretch stable, and I think I installed everything that was necessary.

Debian Linux kernel 4.14.0-2-arm64 shows no output on the serial port

The current kernel does not boot. The previously used 4.13.0-1-arm64 works, but installing a newer kernel (or building an image with the newer kernel) doesn’t work.

The symptom is that there is a black screen on HDMI, and no output on the serial port at all.

Help very welcome.

libguestfs-tools not working - seems qemu issue

Hi all,

Not sure if is a bug in this particular port of debian on the RPi3 or coming from qemu.
I was trying to use virt-resize to create a vm disk image:
virt-resize --expand /dev/sda2 ../images/ubuntu-16.04-server-cloudimg-arm64-uefi1.img ./u16.qcow2 but I got:

[   0.0] Examining ../images/ubuntu-16.04-server-cloudimg-arm64-uefi1.img
virt-resize: error: libguestfs error: guestfs_launch failed.
This usually means the libguestfs appliance failed to start or crashed.
Do:
  export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
and run the command again.  For further information, read:
  http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
You can also run 'libguestfs-test-tool' and post the *complete* output
into a bug report or message to the libguestfs mailing list.

If reporting bugs, run virt-resize with debugging enabled and include the 
complete output:

  virt-resize -v -x [...]

So I have tried with libguestfs-test-tool and I got:

pi@rpi3:~/disks$ libguestfs-test-tool 
     ************************************************************
     *                    IMPORTANT NOTICE
     *
     * When reporting bugs, include the COMPLETE, UNEDITED
     * output below in your bug report.
     *
     ************************************************************
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
LIBGUESTFS_TRACE=1
LIBVIRT_DEFAULT_URI=qemu:///system
LIBGUESTFS_DEBUG=1
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
XDG_RUNTIME_DIR=/run/user/1000
SELinux: sh: 1: getenforce: not found
libguestfs: trace: add_drive_scratch 104857600
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: disk_create "/tmp/libguestfsVYt0vM/scratch1.img" "raw" 104857600
libguestfs: trace: disk_create = 0
libguestfs: trace: add_drive "/tmp/libguestfsVYt0vM/scratch1.img" "format:raw" "cachemode:unsafe"
libguestfs: trace: add_drive = 0
libguestfs: trace: add_drive_scratch = 0
libguestfs: trace: get_append
libguestfs: trace: get_append = "NULL"
guestfs_get_append: (null)
libguestfs: trace: get_autosync
libguestfs: trace: get_autosync = 1
guestfs_get_autosync: 1
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
guestfs_get_backend: direct
libguestfs: trace: get_backend_settings
libguestfs: trace: get_backend_settings = []
guestfs_get_backend_settings: []
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
guestfs_get_cachedir: /var/tmp
libguestfs: trace: get_hv
libguestfs: trace: get_hv = "/usr/bin/qemu-system-aarch64"
guestfs_get_hv: /usr/bin/qemu-system-aarch64
libguestfs: trace: get_memsize
libguestfs: trace: get_memsize = 768
guestfs_get_memsize: 768
libguestfs: trace: get_network
libguestfs: trace: get_network = 0
guestfs_get_network: 0
libguestfs: trace: get_path
libguestfs: trace: get_path = "/usr/lib/aarch64-linux-gnu/guestfs"
guestfs_get_path: /usr/lib/aarch64-linux-gnu/guestfs
libguestfs: trace: get_pgroup
libguestfs: trace: get_pgroup = 0
guestfs_get_pgroup: 0
libguestfs: trace: get_program
libguestfs: trace: get_program = "libguestfs-test-tool"
guestfs_get_program: libguestfs-test-tool
libguestfs: trace: get_recovery_proc
libguestfs: trace: get_recovery_proc = 1
guestfs_get_recovery_proc: 1
libguestfs: trace: get_smp
libguestfs: trace: get_smp = 1
guestfs_get_smp: 1
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/run/user/1000"
guestfs_get_sockdir: /run/user/1000
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
guestfs_get_tmpdir: /tmp
libguestfs: trace: get_trace
libguestfs: trace: get_trace = 1
guestfs_get_trace: 1
libguestfs: trace: get_verbose
libguestfs: trace: get_verbose = 1
guestfs_get_verbose: 1
host_cpu: aarch64
Launching appliance, timeout set to 600 seconds.
libguestfs: trace: launch
libguestfs: trace: max_disks
libguestfs: trace: max_disks = 255
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 38, release: 1, extra: , >
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.38.1
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfsVYt0vM
libguestfs: launch: umask=0022
libguestfs: launch: euid=1000
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-1000/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu aarch64
libguestfs: command: run: \ /usr/lib/aarch64-linux-gnu/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-1000/appliance.d
supermin: version: 5.1.19
supermin: package handler: debian/dpkg
supermin: acquiring lock on /var/tmp/.guestfs-1000/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: checking for previously cached test results of /usr/bin/qemu-system-aarch64, in /var/tmp/.guestfs-1000
libguestfs: loading previously cached test results
libguestfs: QMP parse error: parse error: premature EOF\n                                       \n                     (right here) ------^\n (ignored)
libguestfs: qemu version: 2.12
libguestfs: qemu mandatory locking: yes
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/run/user/1000"
libguestfs: finished testing qemu features
libguestfs: trace: get_backend_setting "gdb"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: command: run: cp
libguestfs: command: run: \ /usr/share/AAVMF/AAVMF_VARS.fd
libguestfs: command: run: \ /tmp/libguestfsVYt0vM/vars2.fd
/usr/bin/qemu-system-aarch64 \
    -global virtio-blk-pci.scsi=off \
    -enable-fips \
    -nodefaults \
    -display none \
    -machine virt,gic-version=host,accel=kvm:tcg \
    -cpu host \
    -m 768 \
    -no-reboot \
    -rtc driftfix=slew \
    -drive if=pflash,format=raw,file=/usr/share/AAVMF/AAVMF_CODE.fd,readonly \
    -drive if=pflash,format=raw,file=/tmp/libguestfsVYt0vM/vars2.fd \
    -kernel /var/tmp/.guestfs-1000/appliance.d/kernel \
    -initrd /var/tmp/.guestfs-1000/appliance.d/initrd \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-scsi-pci,id=scsi \
    -drive file=/tmp/libguestfsVYt0vM/scratch1.img,cache=unsafe,format=raw,id=hd0,if=none \
    -device scsi-hd,drive=hd0 \
    -drive file=/var/tmp/.guestfs-1000/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none,format=raw \
    -device scsi-hd,drive=appliance \
    -device virtio-serial-pci \
    -serial stdio \
    -chardev socket,path=/run/user/1000/libguestfsSl6Aet/guestfsd.sock,id=channel0 \
    -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
    -append "panic=1 console=ttyAMA0 earlyprintk=pl011,,0x9000000 ignore_loglevel efi-rtc=noprobe edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color"
qemu-system-aarch64: Unable to determine GIC version supported by host
libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages
libguestfs: child_cleanup: 0xaaaaee5ef3c0: child process died
libguestfs: sending SIGTERM to process 16347
libguestfs: error: /usr/bin/qemu-system-aarch64 exited with error status 1, see debug messages above
libguestfs: error: guestfs_launch failed, see earlier error messages
libguestfs: trace: launch = -1 (error)
libguestfs: trace: close
libguestfs: closing guestfs handle 0xaaaaee5ef3c0 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsVYt0vM
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /run/user/1000/libguestfsSl6Aet

The problem seems at qemu-system-aarch64: Unable to determine GIC version supported by host
The version of libguestfs-tools is 1.38.1

There is a way to solve this or maybe is better to report to qemu?

Document vmdb2 version requirement

To get the image to work on a with vmdb2 from Buster I had to change the fstab and kernel cmdline rootfs to use device names instead of partition labels:

diff --git a/fstab b/fstab
index 9d8699b..5dd5a98 100644
--- a/fstab
+++ b/fstab
@@ -1,5 +1,5 @@
 # The root file system has fs_passno=1 as per fstab(5) for automatic fsck.
-LABEL=raspiroot / ext4 rw 0 1
+/dev/mmcblk0p2 / ext4 rw 0 1
 # All other file systems have fs_passno=2 as per fstab(5) for automatic fsck.
-LABEL=raspiboot /boot/firmware vfat rw 0 2
+/dev/mmcblk0p1 /boot/firmware vfat rw 0 2
 proc /proc proc defaults 0 0
diff --git a/raspi3.yaml b/raspi3.yaml
index 579234e..46cd816 100644
--- a/raspi3.yaml
+++ b/raspi3.yaml
@@ -117,12 +120,6 @@ steps:
       apt-get clean
       rm -rf /var/lib/apt/lists
 
-  # Modify the kernel commandline we take from the firmware to boot from
-  # the partition labeled raspiroot instead of forcing it to mmcblk0p2
-  - chroot: root-fs
-    shell: |
-      sed -i 's/.dev.mmcblk0p2/LABEL=raspiroot/' /boot/firmware/cmdline.txt
-
   # TODO(https://github.com/larswirzenius/vmdb2/issues/24): remove once vmdb
   # clears /etc/resolv.conf on its own.
   - shell: |

Apparently the vmdb2 version in Buster doesn't yet have support for labels in mkfs (1aa73ce); there hasn't even been a release of vmdb2 that includes the change. It would be good to have this requirement documented in README.md.

Wireless interface disappeared (Raspberry Pi 3 B)

After upgrading from 4.16.0-2-arm64 to 4.18.0-1-arm64, interface wlan0 is missing and I've got no wireless connection. Reinstalling the firmware and downgrading to an older kernel does not help.
The Ethernet connection works correctly but I've got no wireless connectivity and no wireless interfaces show up in lsusb or ifconfig.

enable SND_SIMPLE_CARD

Hi Gunnar

I recently got onto the rpi3 wagon for a home made smart speaker ... sooo

To support the respeaker hat https://github.com/respeaker/seeed-voicecard.git we would need CONFIG_SND_SIMPLE_CARD be available. Is there a reason why this is disabled and could it be enabled?

Furthermore, any plan to support the device tree overlay stuff raspian is doing, again to get support for the respeaker ;-)

Unable to build image: ROOT: parameter not set

While trying to build the current HEAD I've got:

2018-08-21 18:11:40 ERROR Command failed: chroot /tmp/tmpgedynjni sh -c sed -i 's/.dev.mmcblk0p2/LABEL=raspiroot/' ${ROOT?}/boot/firmware/cmdline.txt
b''
b'/usr/bin/sh: 1: ROOT: parameter not set\n'
2018-08-21 18:11:40 ERROR Command failed: chroot /tmp/tmpgedynjni sh -c sed -i 's/.dev.mmcblk0p2/LABEL=raspiroot/' ${ROOT?}/boot/firmware/cmdline.txt
b''
b'/usr/bin/sh: 1: ROOT: parameter not set\n'
Traceback (most recent call last):
  File "/home/lisandro/damian/raspberrypi/raspi3-image-spec/vmdb2/vmdb/app.py", line 95, in run_steps_helper
    method(step, self.settings, state)
  File "/home/lisandro/damian/raspberrypi/raspi3-image-spec/vmdb2/vmdb/plugins/chroot_plugin.py", line 47, in run
    vmdb.runcmd_chroot(mount_point, ['sh', '-c', shell])
  File "/home/lisandro/damian/raspberrypi/raspi3-image-spec/vmdb2/vmdb/runcmd.py", line 58, in runcmd_chroot
    return runcmd(full_argv, *argvs, **kwargs)
  File "/home/lisandro/damian/raspberrypi/raspi3-image-spec/vmdb2/vmdb/runcmd.py", line 53, in runcmd
    return cliapp.runcmd(argv, *argvs, **kwargs)
  File "/usr/lib/python3/dist-packages/cliapp/runcmd.py", line 64, in runcmd
    raise cliapp.AppException(msg)
cliapp.app.AppException: Command failed: chroot /tmp/tmpgedynjni sh -c sed -i 's/.dev.mmcblk0p2/LABEL=raspiroot/' ${ROOT?}/boot/firmware/cmdline.txt
b''
b'/usr/bin/sh: 1: ROOT: parameter not set\n'
2018-08-21 18:11:40 INFO Something went wrong, cleaning up!

@gwolf I switched back to 68344d7 and the build worked perfectly. So I guess it's related to your latests changes.

Suggest changing compression method and dd...

Two things I would suggest changing

  1. Compression improvement... bzip2 compresses OK, but not great, and not fast. For speed, lz4 -9 is great, but doesn't compress as well...
  2. dd image writing method.
    2a. You show decompressing, then using dd to write out the image. This is /slower/ than decompressing to stdout piped to the dd.
    2b. Picking a larger block size doesn't really buy you anything beyond inflated fake buffered numbers and maybe showing complete before data is actually synced

What I would suggest on #1... Since many people download the output, it's worth taking a bit longer to compress better, using xz -8
ref. Your 2017-10-08 image as bz2 is 220M, lz4 -9 is 264M, xz -6 is 167M, xz -8 is 163M. As a bonus, decompression of xz is faster than bzip2...

What I would suggest on #2a. decompress to the dd, it saves a step and it means fewer reads from your disk are needed to write the image out...
What I would suggest on #2b is a block size that fits well within /sys/block//queue/max_sectors_kb
To simplify vs checking, 64k is typically going to fit well, and be a good fit vs the flash device erase/page size. To help protect against reporting complete while writes are still taking place, I suggest a couple output flags, and to make sure the input pipe works well, I'll suggest a iflag as well. I also like to know how things are progressing, so I'll suggest a status argument as well, if the OS supports it (debian does)...
#2 combined example...

xzcat 2017-10-08-raspberry-pi-3-buster-PREVIEW.img.xz | dd of=/dev/sdb bs=64k oflag=dsync status=progress

  • xzcat: decompress an XZ file to stdout. Could use xz -dc the same way
  • 2017-10-08-raspberry-pi-3-buster-PREVIEW.img.xz: Compressed image file name
  • |: pipe to redirect the stdout decompressed stream
  • dd: to process the data movement from the image file to disk target
  • of: output file
  • /dev/sdb: the device we're going to write over (make sure to select correctly) in this case /dev/sdb
  • bs: block size, we're using 64k above.
  • oflag: output flags
  • dsync: sync data on writes. This means when the dd completes, the data is actually committed to the target device. It also means performance indications will be more accurate.
  • status=progress: display performance information as the dd runs, and when it completes.

Much thanks for the work on the rp3 tools and images - I really appreciate it!

Unable to built image : error on update-initramfs

Hello,
I've try to build the image but it fails with the following log entries
Any idea ?
Best,

2018-08-09 15:02:10 DEBUG STDOUT: b'Processing triggers for initramfs-tools (0.132) ...\n'
2018-08-09 15:02:11 DEBUG STDOUT: b'update-initramfs: Generating /boot/initrd.img-4.17.0-1-arm64\n'
2018-08-09 15:04:13 DEBUG STDERR: b'qemu: Unsupported syscall: 267\n'
2018-08-09 15:04:13 DEBUG STDERR: b'/bin/sync: '
2018-08-09 15:04:13 DEBUG STDERR: b"error syncing '/boot/initrd.img-4.17.0-1-arm64'"
2018-08-09 15:04:13 DEBUG STDERR: b': Function not implemented\n'
2018-08-09 15:04:13 DEBUG STDOUT: b'Processing triggers for dbus (1.12.10-1) ...\n'
2018-08-09 15:04:13 DEBUG STDERR: b'dpkg: error processing package initramfs-tools (--configure):\n installed initramfs-tools package post-installation script subprocess returned error exit status 1\n'
2018-08-09 15:04:13 DEBUG STDERR: b'Errors were encountered while processing:\n linux-image-4.17.0-1-arm64\n linux-image-arm64\n initramfs-tools\n'
2018-08-09 15:04:14 DEBUG STDERR: b'E'
2018-08-09 15:04:14 DEBUG STDERR: b': '
2018-08-09 15:04:14 DEBUG STDERR: b'Sub-process /usr/bin/dpkg returned an error code (1)'

apt-get fails after base system install: complains about expired release file

When running sudo ./vmdb2/vmdb2 --output raspi3.img raspi3.yaml --log raspi3.log, image creation fails after installing the base system because apt-get complains about an expired release file:

2017-10-25 00:34:27 DEBUG STDOUT: b'I: Base system installed successfully.\n'
2017-10-25 00:34:27 INFO Running step: {'chroot': 'root-fs', 'shell': "echo 'deb http://snapshot.debian.org/archive/debian/20171007T213914Z buster main contrib non-free' > /etc/apt/sources.list\napt-get update"}
2017-10-25 00:34:27 INFO chroot /tmp/tmp33d59zd3 to echo 'deb http://snapshot.debian.org/archive/debian/20171007T213914Z buster main contrib non-free' > /etc/apt/sources.list apt-get update
2017-10-25 00:34:27 INFO Exec: ['chroot', '/tmp/tmp33d59zd3', 'sh', '-c', "echo 'deb http://snapshot.debian.org/archive/debian/20171007T213914Z buster main contrib non-free' > /etc/apt/sources.list\napt-get update"]
2017-10-25 00:34:27 DEBUG run external command: [['chroot', '/tmp/tmp33d59zd3', 'sh', '-c', "echo 'deb http://snapshot.debian.org/archive/debian/20171007T213914Z buster main contrib non-free' > /etc/apt/sources.list\napt-get update"]]
2017-10-25 00:34:28 DEBUG STDOUT: b'Get:1 http://snapshot.debian.org/archive/debian/20171007T213914Z buster InRelease [136 kB]\n'
2017-10-25 00:34:29 DEBUG STDOUT: b'Reading package lists...'
2017-10-25 00:34:29 DEBUG STDOUT: b'\n'
2017-10-25 00:34:29 DEBUG STDERR: b'E'
2017-10-25 00:34:29 DEBUG STDERR: b': Release file for http://snapshot.debian.org/archive/debian/20171007T213914Z/dists/buster/InRelease is expired (invalid since 10d 2h 4min 23s). Updates for this repository will not be applied.'
2017-10-25 00:34:29 DEBUG STDERR: b'\n'
2017-10-25 00:34:29 ERROR Command failed: chroot /tmp/tmp33d59zd3 sh -c echo 'deb http://snapshot.debian.org/archive/debian/20171007T213914Z buster main contrib non-free' > /etc/apt/sources.list
apt-get update
b'Get:1 http://snapshot.debian.org/archive/debian/20171007T213914Z buster InRelease [136 kB]\nReading package lists...\n'
b'E: Release file for http://snapshot.debian.org/archive/debian/20171007T213914Z/dists/buster/InRelease is expired (invalid since 10d 2h 4min 23s). Updates for this repository will not be applied.\n'
2017-10-25 00:34:29 ERROR Command failed: chroot /tmp/tmp33d59zd3 sh -c echo 'deb http://snapshot.debian.org/archive/debian/20171007T213914Z buster main contrib non-free' > /etc/apt/sources.list
apt-get update
b'Get:1 http://snapshot.debian.org/archive/debian/20171007T213914Z buster InRelease [136 kB]\nReading package lists...\n'
b'E: Release file for http://snapshot.debian.org/archive/debian/20171007T213914Z/dists/buster/InRelease is expired (invalid since 10d 2h 4min 23s). Updates for this repository will not be applied.\n'
Traceback (most recent call last):
  File "/mnt/fah/mem/omega_home/apps/raspi3-image-spec/vmdb2/vmdb/app.py", line 95, in run_steps_helper
    method(step, self.settings, state)
  File "/mnt/fah/mem/omega_home/apps/raspi3-image-spec/vmdb2/vmdb/plugins/chroot_plugin.py", line 47, in run
    vmdb.runcmd_chroot(mount_point, ['sh', '-c', shell])
  File "/mnt/fah/mem/omega_home/apps/raspi3-image-spec/vmdb2/vmdb/runcmd.py", line 58, in runcmd_chroot
    return runcmd(full_argv, *argvs, **kwargs)
  File "/mnt/fah/mem/omega_home/apps/raspi3-image-spec/vmdb2/vmdb/runcmd.py", line 53, in runcmd
    return cliapp.runcmd(argv, *argvs, **kwargs)
  File "/usr/lib/python3/dist-packages/cliapp/runcmd.py", line 64, in runcmd
    raise cliapp.AppException(msg)
cliapp.app.AppException: Command failed: chroot /tmp/tmp33d59zd3 sh -c echo 'deb http://snapshot.debian.org/archive/debian/20171007T213914Z buster main contrib non-free' > /etc/apt/sources.list
apt-get update
b'Get:1 http://snapshot.debian.org/archive/debian/20171007T213914Z buster InRelease [136 kB]\nReading package lists...\n'
b'E: Release file for http://snapshot.debian.org/archive/debian/20171007T213914Z/dists/buster/InRelease is expired (invalid since 10d 2h 4min 23s). Updates for this repository will not be applied.\n'
2017-10-25 00:34:29 INFO Something went wrong, cleaning up!

I was able to fix this by instructing apt-get to ignore the check with -o Acquire::Check-Valid-Until=false, but I'm not sure whether this is the best solution.

CPU frequency never rises above 600 MHz under load, even with arm_freq = 1200

Using the SDL2 build as a benchmark I'm seeing the Buster kernel take ~2x as long to compile vs. the current Raspbian kernel:

Buster:

$ time nice make -j 4
real    7m44.169s
user    27m46.941s
sys     2m17.021s

Raspbian:

$ time nice make -j 4
real    3m14.458s
user    11m50.851s
sys     0m39.507s

SDL build procedure:

sudo apt install cmake git-core libgbm-dev
sudo apt build-dep libsdl2
git clone https://github.com/SDL-mirror/SDL.git
cd SDL
git checkout 54cddf8952802fa94f359d21c6da46979e10ce0
mkdir build
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release 
time nice make -j 4

Buster system info:

vcgencmd built from https://github.com/raspberrypi/userland

$ uname -a
Linux rpi3 4.19.0-4-arm64 #1 SMP Debian 4.19.28-2 (2019-03-15) aarch64 GNU/Linux

$ cat /boot/firmware/cmdline.txt 
console=tty0 console=ttyS1,115200 root=LABEL=RASPIROOT rw elevator=deadline fsck.repair=yes net.ifnames=0 cma=256M rootwait

$ cat /boot/firmware/config.txt | grep -v '#'
arm_control=0x200
enable_uart=1
kernel=vmlinuz-4.19.0-4-arm64
initramfs initrd.img-4.19.0-4-arm64

$ vcgencmd get_config int | grep -E 'arm_freq|core_freq|gpu_freq|sdram_freq'
arm_freq=1200
core_freq=250
gpu_freq=300
sdram_freq=450

$ vcgencmd get_mem arm && vcgencmd get_mem gpu
arm=948M
gpu=76M

# idle
$ vcgencmd measure_clock arm && vcgencmd measure_temp
frequency(45)=600000000
temp=48.3'C

# about 75% through the 'make'
$ vcgencmd measure_clock arm && vcgencmd measure_temp
frequency(45)=600000000
temp=64.5'C

Raspbian system info:

# version/source info:
https://www.raspberrypi.org/downloads/raspbian/
https://downloads.raspberrypi.org/raspbian_lite_latest
Version: April 2019
Release date: 2019-04-08
Kernel version: 4.14
SHA-256: 03ec326d45c6eb6cef848cf9a1d6c7315a9410b49a276a6b28e67a40b11fdfcf

$ uname -a
Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux

$ cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=0db4cca0-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

$ cat /boot/config.txt | grep -v '#'
dtparam=audio=on

$ vcgencmd get_config int | grep -E 'arm_freq|core_freq|gpu_freq|sdram_freq'
arm_freq=1200
core_freq=400
gpu_freq=300
sdram_freq=450

$ vcgencmd get_mem arm && vcgencmd get_mem gpu
arm=948M
gpu=76M

# idle
$ vcgencmd measure_clock arm && vcgencmd measure_temp
frequency(45)=600000000
temp=46.2'C

# about 75% through the 'make'
$ vcgencmd measure_clock arm && vcgencmd measure_temp
frequency(45)=1200000000
temp=76.8'C

For Buster the firmware reports the arm_freq = 1200 config but the actual measure_clock arm frequency never goes above 600 MHz, even under load.

qemu-debootstrap is failing

While trying to generate the image on Ubuntu 17.10 amd64 (my main computer uses Ubuntu and I would like to use Debian ARM64bit on my new Raspberry Pi 3 B+), it fails to find /usr/share/keyrings/debian-archive-keyring.gpg.

In order to solve this problem, on Ubuntu, one should install the Debian Archive Keyring package: sudo apt install debian-archive-keyring.

But that was not enough, after solving that problem it fails later on (after a few minutes running) with:

2018-03-24 23:41:28 INFO Running step: {'qemu-debootstrap': 'buster', 'mirror': 'http://deb.debian.org/debian', 'target': 'root-fs', 'arch': 'a
rm64', 'components': ['main', 'contrib', 'non-free']}
2018-03-24 23:41:28 INFO Qemu-debootstrap buster /tmp/tmpbjhtleuk http://deb.debian.org/debian arm64
2018-03-24 23:41:28 INFO Exec: ['qemu-debootstrap', '--arch', 'arm64', '--variant', '-', '--components', 'main,contrib,non-free', 'buster', '/t
mp/tmpbjhtleuk', 'http://deb.debian.org/debian']
2018-03-24 23:41:28 DEBUG run external command: [['qemu-debootstrap', '--arch', 'arm64', '--variant', '-', '--components', 'main,contrib,non-fr
ee', 'buster', '/tmp/tmpbjhtleuk', 'http://deb.debian.org/debian']]
2018-03-24 23:41:28 DEBUG STDERR: b'I: Running command: debootstrap --arch arm64 --foreign --variant - --components main,contrib,non-free buste
r /tmp/tmpbjhtleuk http://deb.debian.org/debian\n'
2018-03-24 23:41:28 DEBUG STDOUT: b'I: Retrieving InRelease \n'
2018-03-24 23:41:29 DEBUG STDOUT: b'I: Checking Release signature\n'

(...)

2018-03-24 23:43:35 ERROR Command failed: qemu-debootstrap --arch arm64 --variant - --components main,contrib,non-free buster /tmp/tmpbjhtleuk http://deb.debian.org/debian

Note that when I simply run this qemu-debootstrap --arch arm64 --version I get:

I: Running command: debootstrap --arch arm64 --foreign --version
debootstrap 1.0.91ubuntu1.1
cp: '/usr/bin/qemu-aarch64-static' and '/usr/bin/qemu-aarch64-static' are the same file

so maybe this is a Ubuntu 17.10 qemu bug...

non-HDMI audio not detected

I've built an image using this tool (over the weekend, on Jan 19), but the non-HDMI audio doesn't seem to be detected. HDMI audio is detected:

$ cat /proc/asound/cards 
 0 [vc4hdmi        ]: vc4-hdmi - vc4-hdmi
                      vc4-hdmi

and I'm able to output audio that way when connected to a display, using aplay -D iec958 $FILE; however, connecting a powered speaker to the 3.5mm jack doesn't produce any output. I've tried adding dtparam=audio=on in /boot/firmware/config.txt, but that doesn't change anything.

Using a 32-bit Raspbian image, snd_bcm2835 is loaded and shows up as:

$ cat /proc/asound/cards 
 0 [ALSA           ]: bcm2835_alsa - bcm2835 ALSA
                      bcm2835 ALSA

Manually loading snd_bcm2835 doesn't do anything. Is the 3.5mm jack not yet supported in 64-bit mode? I see a couple references in the issue tracker here to HDMI audio, but nothing else related to the 3.5mm jack. I'm planning to use this RPi3 headless, but with a speaker attached, so the HDMI audio isn't something I can use.

Desktop environment

Hi,

I am trying to install a desktop environment on buster with kern 4.18 RC5 on the 3 B+.
I tried LXDE and XFCE, both with the same result:
After installation I am not able to login anymore, neither through the desktop, nor through tty.
The boot messages just stop at some point and nothing happens.
Any ideas what I have to do differently?

kern.log last messages:

Jun 22 11:12:04 rpi3 kernel: [ 24.870595] PKCS#7 signature not signed with a trusted key
Jun 22 11:12:05 rpi3 kernel: [ 25.156754] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Jun 22 11:12:05 rpi3 kernel: [ 25.176607] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Aug 24 17:25:17 rpi3 kernel: [ 34.571275] logitech-hidpp-device XXXX:XXXX:XXXX.XXXX: HID++ 4.1 device connected.
Aug 24 17:49:23 rpi3 kernel: [ 1480.026519] PKCS#7 signature not signed with a trusted key
Aug 24 17:49:23 rpi3 kernel: [ 1480.047023] fuse init (API version 7.27)
Aug 24 18:08:53 rpi3 kernel: [ 2649.947500] audit: type=1400 audit(1535134133.219:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/man" pid=22319 comm="apparmor_parser"
Aug 24 18:08:53 rpi3 kernel: [ 2649.963797] audit: type=1400 audit(1535134133.219:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="man_filter" pid=22319 comm="apparmor_parser"
Aug 24 18:08:53 rpi3 kernel: [ 2649.979813] audit: type=1400 audit(1535134133.223:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="man_groff" pid=22319 comm="apparmor_parser"
Aug 24 18:13:03 rpi3 kernel: [ 2900.110325] PKCS#7 signature not signed with a trusted key
Aug 24 18:13:03 rpi3 kernel: [ 2900.125653] PKCS#7 signature not signed with a trusted key
Aug 24 18:13:03 rpi3 kernel: [ 2900.147003] PKCS#7 signature not signed with a trusted key
Aug 24 18:13:03 rpi3 kernel: [ 2900.158302] NET: Registered protocol family 5
Aug 24 18:16:35 rpi3 kernel: [ 3111.866095] audit: type=1400 audit(1535134595.137:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince" pid=26103 comm="apparmor_parser"
Aug 24 18:16:35 rpi3 kernel: [ 3111.882539] audit: type=1400 audit(1535134595.141:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince//sanitized_helper" pid=26103 comm="apparmor_parser"
Aug 24 18:16:35 rpi3 kernel: [ 3111.900704] audit: type=1400 audit(1535134595.149:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince-previewer" pid=26103 comm="apparmor_parser"
Aug 24 18:16:35 rpi3 kernel: [ 3111.918068] audit: type=1400 audit(1535134595.153:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince-previewer//sanitized_helper" pid=26103 comm="apparmor_parser"
Aug 24 18:16:35 rpi3 kernel: [ 3111.937049] audit: type=1400 audit(1535134595.161:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince-thumbnailer" pid=26103 comm="apparmor_parser"
Aug 24 18:16:35 rpi3 kernel: [ 3111.954539] audit: type=1400 audit(1535134595.165:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince-thumbnailer//sanitized_helper" pid=26103 comm="apparmor_parser"`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.