Skip to content
Snippets Groups Projects
Unverified Commit 3346f9c5 authored by Johannes Schauer Marin Rodrigues's avatar Johannes Schauer Marin Rodrigues
Browse files

.gitlab-ci.yml: only install required packages

parent 29b3c766
No related branches found
No related tags found
No related merge requests found
Pipeline #504 failed
...@@ -8,8 +8,7 @@ build: ...@@ -8,8 +8,7 @@ build:
- "printf 'Package: *\\nPin: release n=bookworm\\nPin-Priority: 100\\n' > /etc/apt/preferences.d/bookworm.pref" - "printf 'Package: *\\nPin: release n=bookworm\\nPin-Priority: 100\\n' > /etc/apt/preferences.d/bookworm.pref"
- apt update - apt update
- apt-get -y install -t bookworm mmdebstrap genext2fs - apt-get -y install -t bookworm mmdebstrap genext2fs
- apt-get -y install sudo gzip libext2fs2 pigz - apt-get -y install e2fsprogs pigz binfmt-support git mount arch-test qemu-user-static parted
- apt-get -y install bc parted udisks2 gcc-aarch64-linux-gnu make device-tree-compiler qemu-user-static binfmt-support build-essential bison flex libssl-dev bash git qemu-system-aarch64
- cd reform2-imx8mq - cd reform2-imx8mq
- bash mkimage.sh - bash mkimage.sh
- pigz reform-system.img - pigz reform-system.img
......
  • Hi @josch!

    I installed a fresh Debian Testing on my private Laptop to check your latest build process. Unfortunately the created images do not boot after dd'ing them to the SD card and inserting them into the Reform. Surprisingly the build script tried to fiddle with my host SSD and PCI stuff:

    Not creating home directory `/var/lib/tpm'.
    Failed to send reload request: No such file or directory
    tpm0: Failed to write 'change' to '/sys/devices/LNXSYSTM:00/LNXSYBUS:00/MSFT0101:00/tpm/tpm0/uevent': Permission denied
    tpm0: Failed to write 'add' to '/sys/devices/LNXSYSTM:00/LNXSYBUS:00/MSFT0101:00/tpm/tpm0/uevent': Permission denied
    tpmrm0: Failed to write 'add' to '/sys/devices/LNXSYSTM:00/LNXSYBUS:00/MSFT0101:00/tpmrm/tpmrm0/uevent': Permission denied
    Setting up linux-image-5.17.0-rc3-arm64 (5.17~rc3-1~exp2+reform1) ...
    I: /vmlinuz.old is now a symlink to boot/vmlinuz-5.17.0-rc3-arm64
    I: /initrd.img.old is now a symlink to boot/initrd.img-5.17.0-rc3-arm64
    I: /vmlinuz is now a symlink to boot/vmlinuz-5.17.0-rc3-arm64
    I: /initrd.img is now a symlink to boot/initrd.img-5.17.0-rc3-arm64
    /etc/kernel/postinst.d/apt-auto-removal:
    W: Unable to read /home/hartko/reform/josh-sysimg/reform2-imx8mq/mmdebstrap.uZF2Fm6sw0/tmp/mmdebstrap.apt.conf.ECDenGlnfV9F - RealFileExists (2: No such file or directory)
    /etc/kernel/postinst.d/initramfs-tools:
    update-initramfs: Generating /boot/initrd.img-5.17.0-rc3-arm64
    find: ‘/var/tmp/mkinitramfs_T18whO/lib/modules/5.17.0-rc3-arm64/kernel’: No such file or directory
    W: Possible missing firmware /lib/firmware/cadence/mhdp8546.bin for built-in driver cdns_mhdp8546
    W: Possible missing firmware /lib/firmware/ath9k_htc/htc_9271-1.4.0.fw for built-in driver ath9k_htc
    W: Possible missing firmware /lib/firmware/ath9k_htc/htc_7010-1.4.0.fw for built-in driver ath9k_htc
    W: Possible missing firmware /lib/firmware/ar5523.bin for built-in driver ar5523
    (..)
    W: Possible missing firmware /lib/firmware/mediatek/mt7663pr2h.bin for built-in driver btmtk
    cryptsetup: WARNING: Couldn't determine root device
    cryptsetup: ERROR: Couldn't resolve device /dev/nvme0n1p7
    Warning: root device /dev/mmcblk1p2 does not exist
    W: Couldn't identify type of root file system for fsck hook
    cp: cannot create special file '/var/tmp/mkinitramfs_T18whO/etc/console-setup/null': Operation not permitted
    Setting up udisks2 (2.9.4-1) ...
    sda: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host2/target2:0:0/2:0:0:0/block/sda/uevent': Permission denied
    sda1: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host2/target2:0:0/2:0:0:0/block/sda/sda1/uevent': Permission denied
    sda2: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host2/target2:0:0/2:0:0:0/block/sda/sda2/uevent': Permission denied
    nvme0n1: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1d.0/0000:03:00.0/nvme/nvme0/nvme0n1/uevent': Permission denied
    nvme0n1p1: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1d.0/0000:03:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/uevent': Permission denied
    nvme0n1p2: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1d.0/0000:03:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/uevent': Permission denied
    nvme0n1p3: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1d.0/0000:03:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/uevent': Permission denied
    nvme0n1p4: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1d.0/0000:03:00.0/nvme/nvme0/nvme0n1/nvme0n1p4/uevent': Permission denied
    nvme0n1p5: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1d.0/0000:03:00.0/nvme/nvme0/nvme0n1/nvme0n1p5/uevent': Permission denied
    nvme0n1p6: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1d.0/0000:03:00.0/nvme/nvme0/nvme0n1/nvme0n1p6/uevent': Permission denied
    nvme0n1p7: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1d.0/0000:03:00.0/nvme/nvme0/nvme0n1/nvme0n1p7/uevent': Permission denied
    Created symlink /etc/systemd/system/graphical.target.wants/udisks2.service → /lib/systemd/system/udisks2.service.
    Adding user pulse to group audio
    Failed to send reload request: No such file or directory
    card0: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/uevent': Permission denied
    hwC0D0: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/hwC0D0/uevent': Permission denied
    hwC0D2: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/hwC0D2/uevent': Permission denied
    pcmC0D0c: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D0c/uevent': Permission denied
    pcmC0D0p: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D0p/uevent': Permission denied
    pcmC0D10p: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D10p/uevent': Permission denied
    pcmC0D2c: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D2c/uevent': Permission denied
    pcmC0D3p: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D3p/uevent': Permission denied
    pcmC0D7p: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D7p/uevent': Permission denied
    pcmC0D8p: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D8p/uevent': Permission denied
    pcmC0D9p: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/pcmC0D9p/uevent': Permission denied
    controlC0: Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:1f.3/sound/card0/controlC0/uevent': Permission denied
    ctl-led: Failed to write 'change' to '/sys/devices/virtual/sound/ctl-led/uevent': Permission denied
    seq: Failed to write 'change' to '/sys/devices/virtual/sound/seq/uevent': Permission denied
    timer: Failed to write 'change' to '/sys/devices/virtual/sound/timer/uevent': Permission denied
    Created symlink /etc/systemd/user/default.target.wants/pulseaudio.service → /usr/lib/systemd/user/pulseaudio.service.
    Created symlink /etc/systemd/user/sockets.target.wants/pulseaudio.socket → /usr/lib/systemd/user/pulseaudio.socket.
    invoke-rc.d: could not determine current runlevel

    I uploaded a full log build by your latest sysimage-v3 branch here:

    hartkopp/reform-system-image@529cd1ee

  • Now starting the script as root directly on the reform system - maybe this was my fault?!?

  • Yes, this is exactly why you do not want to run the script as root. If you would run it as root, then it would indeed "fiddle with your host SSD and PCI stuff". Even worse, if you would run this as root you would never notice that this fiddling happens because you wouldn't see any messages about that.

    So your "permission denied" messages are expected and they are not the reason why the image you built fails to boot.

    Did you make any changes to the code? I see the line cryptsetup: ERROR: Couldn't resolve device /dev/nvme0n1p7 but that device should not exist.

  • No I did a clean build based on your latest private sysimage-v3 branch. The /dev/nvme0n1p7 is the root device on my x64 i5 laptop. I then tested a clean build from your branch on the Reform2 itself (this time as root). This did not affect the Reform2 functionality, but did not lead to a booting system image either.

    My current Reform2 setup is: Booting from the SD and then mounting the encrypted NVME SDD.

    New logfile here: hartkopp/reform-system-image@2b8d3dbb

    Edited by Oliver Hartkopp
  • Just to confirm: when you download the image from here https://source.mnt.re/reform/reform-system-image/-/jobs/642/artifacts/browse/reform2-imx8mq/ then it works?

  • No, that doesn't boot either (tested the 9GB image). Additionally 'poweroff' does not switch my Reform2 off anymore with my former SD Card (booting the encrypted nvme) - maybe building the image as root was really not that good idea.

  • @hartkopp then your problem is elsewhere. The 9GB image from that link (md5sum 9ad05d8bde3761ac42454238f28574bf) boots just fine over here. Maybe your SD-Card is broken somehow?

  • Getting further ... loaded the image once again and checked the md5sum. Ok dd'ed it on a different (new!) SD Card. Ok. Still no booting. BUT: I attached a HDMI cable (first time) and saw the u-boot with

    mmc0(part 0) is current device
    (..)
    file not found /boot.scr ***
    file not found /boot/boot.scr ***

    And there it stops.

    My former setup only displayed on the internal TFT.

    Edited by Oliver Hartkopp
  • I'm out of ideas. The same image works fine over here. I don't know a reason why the same bytes might fail to boot on your reform.

  • It looks like the u-boot is referring to the internal mmc0 and not to the SD card sitting in the slot.

    Using the internal eMMC as boot device is on my list (and obviously the right approach for the Debian flash-kernel process too) but for now I thought booting from the SDCARD is fine.

    Maybe I can set some of the bootargs differently ...

    Will keep you informed. Thanks for your support & have a nice weekend!

  • This shouldn't be a problem because u-boot tries both: eMMC and the sd-card to find boot.scr.

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment