ubuntu-rockchip
ubuntu-rockchip copied to clipboard
wait_loopdev in scripts/build-image.sh fails when build.sh -d
I'm not sure if this is your code or upstream armbian. This is a first time test for me though so I'm reporting it.
+ test 0 -eq 0 -o -b /dev/loop3p2
+ (( ++seconds ))
+ ls -l /dev/loop3p2
+ echo 'Failure to create /dev/loop3p1 in time'
Failure to create /dev/loop3p1 in time
+ exit 1
+ cleanup_loopdev /dev/loop3
+ local loop=/dev/loop3
+ sync --file-system + sync
+ sleep 1
+ '[' -b /dev/loop3 ']'
+ for part in "${loop}"p*
++ findmnt -n -o target -S '/dev/loop3p*'
+ mnt=
+ losetup -d /dev/loop3
Error: in ./scripts/config-image.sh on line 250
Error: in ./build.sh on line 172
loop device is visible from host
loop3 7:3 0 7G 0 loop
├─loop3p1 259:5 0 512M 0 part
└─loop3p2 259:6 0 6.5G 0 part
barging into the docker container shows the failing test and the loop devices being present
root@host:~# docker exec -it 929279260abf /bin/bash
root@host:/opt# ps -aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 4492 3376 pts/0 Ss+ 23:19 0:00 /bin/bash ./scripts/config-image.sh
root 20 0.0 0.0 4624 3780 pts/1 Ss 23:19 0:00 /bin/bash
root 164 0.0 0.0 3616 2976 pts/1 S+ 23:20 0:00 watch lsblk
root 8720 0.0 0.0 4624 3884 pts/2 Ss 23:23 0:00 /bin/bash
root 8762 0.5 0.0 4460 3372 pts/0 S+ 23:23 0:00 /bin/bash ../scripts/build-image.sh ub
root 8815 0.0 0.0 2788 1052 pts/0 S+ 23:23 0:00 sleep 1
root 8816 0.0 0.0 7368 3152 pts/2 R+ 23:23 0:00 ps -aux
root@host:/opt# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 63.4M 1 loop
loop1 7:1 0 111.9M 1 loop
loop2 7:2 0 53.3M 1 loop
loop3 7:3 0 7G 0 loop
|-loop3p1 259:5 0 512M 0 part
`-loop3p2 259:6 0 6.5G 0 part
nvme1n1 259:0 0 953.9G 0 disk
nvme0n1 259:1 0 931.5G 0 disk
|-nvme0n1p1 259:2 0 1G 0 part
|-nvme0n1p2 259:3 0 2G 0 part
`-nvme0n1p3 259:4 0 928.5G 0 part
root@host:/opt# test 53 -eq 0 -o -b /dev/loop3p2
root@host:/opt# echo $?
1
root@host:/opt# exit
exit
root@host:~# test 53 -eq 0 -o -b /dev/loop3p2
root@host:~# echo $?
0
Here's the docker run line
++ docker run --privileged --network=host --rm -it -v /home/castle/source/ubuntu-rockchip:/opt -e BOARD -e VENDOR -e LAUNCHPAD -e MAINLINE -e SERVER_ONLY -e DESKTOP_ONLY -e KERNEL_ONLY -e UBOOT_ONLY ubuntu-rockchip-build /bin/bash ./scripts/config-image.sh
For whatever reason, the container can create the loop device but not recognize that it is a block device. Docker bug? Bad test inside of a container?
Docker version 24.0.5, build 24.0.5-0ubuntu1~22.04.1
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
I'm improving the build process and making a lot of changes to allow for easy future development. Currently building with Docker needs to be fixed.