Notifications
Clear all

[Mark Solved / Archieved] Manual build of Debian 12 for vivid unit doesn't work

10 Posts
2 Users
0 Reactions
187 Views
(@markus-lampert)
Posts: 6
Active Member Customer
Topic starter
 

I successfully flashed my vivid-unit board with the Debian 12 image and it seems to work OK - thanks.

I then downloaded the sources and followed the build instructions. I did all of this in a Debian 13 `chroot` environment specifically created for this build. However, the step

sudo ./vuos pack vivid-unit

breaks with the following error:

==> Running hook: boards/vivid-unit/hooks/30-vividunit-apt
Hit:1  http://security.debian.org/debian-security  bookworm-security InRelease
Hit:2  http://deb.debian.org/debian  bookworm InRelease
Hit:3  http://deb.debian.org/debian  bookworm-updates InRelease
Get:4  https://vividunit.com/apt  bookworm InRelease [2091 B]
Reading package lists...
E: Could not read from /var/lib/apt/lists/partial/vividunit.com_apt_dists_bookworm_InRelease - getline (12: Cannot allocate memory)
E: The repository 'https://vividunit.com/apt bookworm InRelease' provides only weak security information.

I can work around this installing `aptitude` first and run `aptitude update` instead of `apt update`. With this the build does succeed.

Alter flashing the resulting image though the touch screen doesn't work. The desktop shows up but no touch. Connecting via the console reveals the peripherals aren't working correcty. Other than `lo` there are no network devices and the boot process repeated errors are shown:

[FAILED] Failed to start vu-btattac…nitialize Broadcom Bluetooth UART.
See 'systemctl status vu-btattach.service' for details.
vivid@vivid-unit:~$ systemctl status vu-btattach.service
● vu-btattach.service - Initialize Broadcom Bluetooth UART
     Loaded: loaded (/etc/systemd/system/vu-btattach.service; enabled; preset: >
     Active: activating (auto-restart) (Result: exit-code) since Wed 2026-05-13>
    Process: 13242 ExecStartPre=/sbin/modprobe bluetooth (code=exited, status=1>
        CPU: 13ms
vivid@vivid-unit:~$ 

Any idea what's going wrong and how to fix it?

 
Posted : 13/05/2026 7:04 pm
Topic Tags
(@admin)
Posts: 803
Member Admin
 

Vivid Unit OS build system itself already uses chroot, and it expects a normal host environment. Building inside another chroot is unsupported and may not work properly.

It is not a good practise to install aptitude to workaround an issue without understanding it. You mentioned the build succeeded eventually, but it was not the case according to your test result.

We have tested to build the system in a newly installed VM running Debian 13, and it just works by following the build instructions. I would suggest to build it directly in the real Debian 13 machine, or in a VM running Debian 13.

 

 
Posted : 14/05/2026 7:29 am
(@markus-lampert)
Posts: 6
Active Member Customer
Topic starter
 

I installed a KVM with Debian 13 and I end up with exactly the same error:

==> Running hook: boards/vivid-unit/hooks/30-vividunit-apt
Hit:1  http://security.debian.org/debian-security  bookworm-security InRelease
Hit:2  http://deb.debian.org/debian  bookworm InRelease
Hit:3  http://deb.debian.org/debian  bookworm-updates InRelease
Get:4  https://vividunit.com/apt  bookworm InRelease [2091 B]
Reading package lists...
E: Could not read from /var/lib/apt/lists/partial/vividunit.com_apt_dists_bookworm_InRelease - getline (12: Cannot allocate memory)
E: The repository 'https://vividunit.com/apt bookworm InRelease' provides only weak security information.

real    21m30.129s
user    0m0.019s
sys     0m0.106s
markus@vivid:~/projects/vivid-unit/vivid-unit-os$ 

So the issue is not the chroot itself but something else. Any insight on what's wrong?

 
Posted : 16/05/2026 8:49 am
(@admin)
Posts: 803
Member Admin
 

@markus-lampert

We found and fixed an issue in the APT repository metadata. The previous InRelease file accidentally contained a Release.tmp.* entry in its checksum list. That temporary file was created while the Release file was being generated and should not have been included in the repository metadata.

This kind of malformed Release/InRelease metadata may cause apt to reject a repository (although our testing didn't encounter this). I cannot say with 100% certainty that this was the only cause until you retest, but it is likely related to the error you saw.

The repository has now been regenerated and re-signed. Please retry the build from a clean tree, without replacing apt-get update with aptitude update.

 
Posted : 18/05/2026 7:58 am
(@markus-lampert)
Posts: 6
Active Member Customer
Topic starter
 

Unfortunately it still breaks with the same error:

==> Running hook: boards/vivid-unit/hooks/30-vividunit-apt
Hit:1  http://security.debian.org/debian-security  bookworm-security InRelease
Hit:2  http://deb.debian.org/debian  bookworm InRelease
Hit:3  http://deb.debian.org/debian  bookworm-updates InRelease
Get:4  https://vividunit.com/apt  bookworm InRelease [1880 B]
Reading package lists...
E: Could not read from /var/lib/apt/lists/partial/vividunit.com_apt_dists_bookworm_InRelease - getline (12: Cannot allocate memory)
E: The repository 'https://vividunit.com/apt bookworm InRelease' provides only weak security information.
markus@vivid:~/projects/vivid-unit/vivid-unit-os$

The debian repository did change (used to be `[2091 B]` nos it's `[1880 B]`) although I don't know the significance of that.

I did a fresh `git clone` of the repository into a new directory before the build in the KVM.

After the build failed I ssh'ed into the KVM, re-mounted the rootfs auxiliary filesystems and ran `apt-get update` manually:

markus@vivid:~/projects/vivid-unit/vivid-unit-os/out/rootfs/vivid-unit$ sudo mount --rbind /dev rootfs/dev/
markus@vivid:~/projects/vivid-unit/vivid-unit-os/out/rootfs/vivid-unit$ sudo mount --make-rslave rootfs/dev/
markus@vivid:~/projects/vivid-unit/vivid-unit-os/out/rootfs/vivid-unit$ sudo mount -t proc proc rootfs/proc/
markus@vivid:~/projects/vivid-unit/vivid-unit-os/out/rootfs/vivid-unit$ sudo mount -t sysfs sysfs rootfs/sys
markus@vivid:~/projects/vivid-unit/vivid-unit-os/out/rootfs/vivid-unit$ sudo chroot rootfs/
root@vivid:/# apt-get update
Hit:1  http://security.debian.org/debian-security  bookworm-security InRelease
Get:2  https://vividunit.com/apt  bookworm InRelease [1880 B]                  
Get:3  https://vividunit.com/apt  bookworm/main arm64 Packages [1368 B]        
Hit:4  http://deb.debian.org/debian  bookworm InRelease            
Hit:5  http://deb.debian.org/debian  bookworm-updates InRelease
Fetched 3248 B in 12s (268 B/s)                                                                                                                                                                                    
Reading package lists... Done
root@vivid:/# 

Which came as a surprise to me - so I did the same from the console which I've been using for the builds:

markus@vivid:~/projects/vivid-unit/vivid-unit-os$ sudo chroot out/rootfs/vivid-unit/rootfs/
root@vivid:/# sudo apt-get update
Hit:1  http://security.debian.org/debian-security  bookworm-security InRelease
Hit:2  http://deb.debian.org/debian  bookworm InRelease                                         
Hit:3  http://deb.debian.org/debian  bookworm-updates InRelease                                 
Hit:4  https://vividunit.com/apt  bookworm InRelease                                            
Reading package lists... Done                 
E: Could not read from /var/lib/apt/lists/vividunit.com_apt_dists_bookworm_InRelease - getline (12: Cannot allocate memory)
E: The repository 'https://vividunit.com/apt bookworm InRelease' provides only weak security information.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@vivid:/# 

Note that this one failed _immediately after_ the same command succeeded in the ssh session, literally 30 seconds apart in the same KVM and the same `rootfs`

 
Posted : 18/05/2026 2:59 pm
(@markus-lampert)
Posts: 6
Active Member Customer
Topic starter
 

Interesting - I figured if it works through ssh I just run the entire build in an ssh session instead of the console. Unfortunately that didn't do the trick and it ran into the same issue. Manually mounting /dev /proc and /sys and calling `apt-get update` in the rootfs like before also failed. 

 
Posted : 18/05/2026 6:02 pm
(@admin)
Posts: 803
Member Admin
 

@markus-lampert 

That makes it unlikely that the repository metadata is the cause.

Now I notice this line:

E: Could not read from ... InRelease - getline (12: Cannot allocate memory)

 

The Vivid Unit InRelease file is only about 1.8 KB, so this does not look like a real repository-size problem. It looks more like apt, possibly running as arm64 under qemu-user-static, hitting an environment-specific memory allocation or resource-limit issue.

Maybe you can compare the following between the SSH session where apt-get update succeeds and the console session where it fails:

uname -m
dpkg --print-architecture
qemu-aarch64-static --version || true
ulimit -a
cat /proc/$$/limits
free -h
grep -E 'CommitLimit|Committed_AS|MemAvailable|SwapTotal|SwapFree' /proc/meminfo
cat /proc/sys/vm/overcommit_memory
cat /proc/sys/vm/overcommit_ratio

 

Also, please run apt-get directly inside the chroot, without sudo:

sudo chroot out/rootfs/vivid-unit/rootfs /bin/bash -lc '
apt-get clean
rm -rf /var/lib/apt/lists/*
apt-get update
'
 
Posted : 19/05/2026 7:18 am
(@markus-lampert)
Posts: 6
Active Member Customer
Topic starter
 

Did another clean build for this experiment and could not reproduce the `console` vs. `ssh` success.  I did get success by using `apt update` instead of `apt-get update`

markus@vivid:~/projects/vivid-unit/vivid-unit-os/out/rootfs/vivid-unit$ sudo chroot rootfs/
root@vivid:/# apt update
Hit:1  http://security.debian.org/debian-security  bookworm-security InRelease
Hit:2  http://deb.debian.org/debian  bookworm InRelease               
Hit:3  http://deb.debian.org/debian  bookworm-updates InRelease       
Get:4  https://vividunit.com/apt  bookworm InRelease [1880 B]         
Get:5  https://vividunit.com/apt  bookworm/main arm64 Packages [1368 B]                            
Fetched 3248 B in 13s (251 B/s)     
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
4 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@vivid:/# apt-get update
Hit:1  http://security.debian.org/debian-security  bookworm-security InRelease
Hit:2  http://deb.debian.org/debian  bookworm InRelease                                         
Hit:3  http://deb.debian.org/debian  bookworm-updates InRelease                                 
Hit:4  https://vividunit.com/apt  bookworm InRelease                                            
Reading package lists... Done                 
E: Could not read from /var/lib/apt/lists/vividunit.com_apt_dists_bookworm_InRelease - getline (12: Cannot allocate memory)
E: The repository 'https://vividunit.com/apt bookworm InRelease' provides only weak security information.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@vivid:/# apt update
Hit:1  http://security.debian.org/debian-security  bookworm-security InRelease                                                                                                                                        
Hit:2  http://deb.debian.org/debian  bookworm InRelease                                                                                                                                                               
Hit:3  http://deb.debian.org/debian  bookworm-updates InRelease                                                                                                                                                       
Hit:4  https://vividunit.com/apt  bookworm InRelease                                                                                                                                                                  
Reading package lists... Done                                                                                                                                                                                       
Building dependency tree... Done                                                                                                                                                                                    
Reading state information... Done                                                                                                                                                                                   
4 packages can be upgraded. Run 'apt list --upgradable' to see them.                                                                                                                                                
root@vivid:/# apt-get update                                                                                                                                                                                        
Hit:1  http://security.debian.org/debian-security  bookworm-security InRelease                                                                                                                                        
Hit:2  http://deb.debian.org/debian  bookworm InRelease                                                                                                                                                               
Hit:3  http://deb.debian.org/debian  bookworm-updates InRelease                                                                                                                                                       
Hit:4  https://vividunit.com/apt  bookworm InRelease                                                                                                                                                                  
Reading package lists... Done                                                                                                                                                                                       
E: Could not read from /var/lib/apt/lists/vividunit.com_apt_dists_bookworm_InRelease - getline (12: Cannot allocate memory)                                                                                         
E: The repository 'https://vividunit.com/apt bookworm InRelease' provides only weak security information.                                                                                                           
N: Updating from such a repository can't be done securely, and is therefore disabled by default.                                                                                                                    
N: See apt-secure(8) manpage for repository creation and user configuration details.                                                                                                                                
root@vivid:/# 

 And this is the output from the commands you were looking for:

markus@vivid:~/projects/vivid-unit/vivid-unit-os/out/rootfs/vivid-unit$ uname -m
dpkg --print-architecture
qemu-aarch64-static --version || true
ulimit -a
cat /proc/$$/limits
free -h
grep -E 'CommitLimit|Committed_AS|MemAvailable|SwapTotal|SwapFree' /proc/meminfo
cat /proc/sys/vm/overcommit_memory
cat /proc/sys/vm/overcommit_ratio
x86_64
amd64
qemu-aarch64 version 10.0.8 (Debian 1:10.0.8+ds-0+deb13u1+b2)
Copyright (c) 2003-2025 Fabrice Bellard and the QEMU Project developers
real-time non-blocking time  (microseconds, -R) unlimited
core file size              (blocks, -c) 0
data seg size               (kbytes, -d) unlimited
scheduling priority                 (-e) 0
file size                   (blocks, -f) unlimited
pending signals                     (-i) 31563
max locked memory           (kbytes, -l) 8192
max memory size             (kbytes, -m) unlimited
open files                          (-n) 1024
pipe size                (512 bytes, -p) 8
POSIX message queues         (bytes, -q) 819200
real-time priority                  (-r) 0
stack size                  (kbytes, -s) 8192
cpu time                   (seconds, -t) unlimited
max user processes                  (-u) 31563
virtual memory              (kbytes, -v) unlimited
file locks                          (-x) unlimited
Limit                     Soft Limit           Hard Limit           Units     
Max cpu time              unlimited            unlimited            seconds   
Max file size             unlimited            unlimited            bytes     
Max data size             unlimited            unlimited            bytes     
Max stack size            8388608              unlimited            bytes     
Max core file size        0                    unlimited            bytes     
Max resident set          unlimited            unlimited            bytes     
Max processes             31563                31563                processes 
Max open files            1024                 524288               files     
Max locked memory         8388608              8388608              bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       31563                31563                signals   
Max msgqueue size         819200               819200               bytes     
Max nice priority         0                    0                    
Max realtime priority     0                    0                    
Max realtime timeout      unlimited            unlimited            us        
               total        used        free      shared  buff/cache   available
Mem:           7.8Gi       478Mi       5.4Gi       576Ki       2.1Gi       7.3Gi
Swap:          582Mi        12Ki       582Mi
MemAvailable:    7647068 kB
SwapTotal:        596988 kB
SwapFree:         596976 kB
CommitLimit:     4665732 kB
Committed_AS:     233132 kB
0
50
markus@vivid:~/projects/vivid-unit/vivid-unit-os/out/rootfs/vivid-unit$ 
 
Posted : 19/05/2026 1:25 pm
(@admin)
Posts: 803
Member Admin
 

@markus-lampert I think your RAM may be a little tight for this.

You may try 

sudo sysctl vm.overcommit_memory=1

and then see if that brings any difference.

 
Posted : 19/05/2026 2:44 pm
(@markus-lampert)
Posts: 6
Active Member Customer
Topic starter
 
sudo sysctl vm.overcommit_memory=1

I tried that - unfortunately no impact, still fails. I also ran `apt-get update` after shutting down the VM and after booting it up again I only remounted the auxiliary filesystems in rootfs and the `apt-get update` still failed.

I also did a fresh build after replacing `apt-get update` with `apt update` in 30-vividunit-apt. The build succeeded and it produces a functional image. 

 
Posted : 19/05/2026 5:54 pm
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.