Maccraft123 / Cadmium

GNU General Public License v3.0
316 stars 65 forks source link

C100P - Cadmium Arch WiFi Broken By Default (Needs Workaround) #133

Closed TheNathan0 closed 1 year ago

TheNathan0 commented 2 years ago

Hi,

I attempted to cross compile Cadmium for my 32-bit ChromeBook (Veyron Minnie) recently to get an Arch Linux installer (since none were available that were already compiled) and I've ran into a problem with loading shared libraries.

I installed all the required dependencies (including the ones that were needed for the script to work but not listed on the instructions such as flex, bison, dtc, etc). I have ensured that all of my dependencies are correct for my purpose (cross compiling for my ARM32 C100P/PA).

My build machine is an upgraded (16GB RAM, SSD, etc) MacBook Pro Mid-2012 i5 (Intel). Old, but usable for this kind of task. All Arch Linux packages (including those from the AUR) are at their latest available.

I adjusted the config file as needed to ensure that it will compile for ARM32 and not ARM64.

I ran the build script to install to my USB flash drive with sudo ./build-all /dev/sdc

The script works all the way (through cross compiling, arch-chroot'ing, etc) up until it needs to interact with shared libraries; this is where it stops and gives an error that I've never encountered before.

I've cross compiled and worked with many GNU/Linux variants multiple times in the past; those being for cases similar to me trying to compile Cadmium here and I've never gotten this kind of error before.

Here's a log of what terminal threw out where my issues began:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_NUMERIC = "en_US.UTF-8",
    LC_TIME = "en_US.UTF-8",
    LC_MEASUREMENT = "en_US.UTF-8",
    LC_TELEPHONE = "en_US.UTF-8",
    LC_IDENTIFICATION = "en_US.UTF-8",
    LC_PAPER = "en_US.UTF-8",
    LC_MONETARY = "en_US.UTF-8",
    LC_NAME = "en_US.UTF-8",
    LC_ADDRESS = "en_US.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
(8/8) Updating the info directory file...
+ '[' kernelorg '!=' libre ']'
+ mkdir -p /home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware
+ cp -r /home/nathan/Desktop/O/Cadmium/fs/firmware/ath10k /home/nathan/Desktop/O/Cadmium/fs/firmware/brcm /home/nathan/Desktop/O/Cadmium/fs/firmware/cros-pd /home/nathan/Desktop/O/Cadmium/fs/firmware/elan_i2c_188.0.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elan_i2c_216.0.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elan_i2c_226.0.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elants_i2c_3550.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elants_i2chid_1fa6.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elants_i2chid_3463.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elants_i2chid_3464.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/keyspan /home/nathan/Desktop/O/Cadmium/fs/firmware/mrvl /home/nathan/Desktop/O/Cadmium/fs/firmware/qca /home/nathan/Desktop/O/Cadmium/fs/firmware/qcom /home/nathan/Desktop/O/Cadmium/fs/firmware/rockchip /home/nathan/Desktop/O/Cadmium/fs/firmware/rt2870.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/rt3070.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/rtl_nic /home/nathan/Desktop/O/Cadmium/fs/firmware/scp.img /home/nathan/Desktop/O/Cadmium/fs/firmware/tpm /home/nathan/Desktop/O/Cadmium/fs/firmware/vpu_d.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/vpu_p.bin /home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/
+ mkdir /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles
+ cp -r /home/nathan/Desktop/O/Cadmium/fs /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/fs
+ cp -r /home/nathan/Desktop/O/Cadmium/board /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/board
+ cp -r /home/nathan/Desktop/O/Cadmium/baseboard /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/baseboard
+ cp -r /home/nathan/Desktop/O/Cadmium/fs/install /home/nathan/Desktop/O/Cadmium/tmp/root/root/install
+ echo 'export ROOTFS=arch'
+ echo 'export ARCH_DEB=armhf'
+ echo 'export ARCH_ALARM=armv7'
+ echo 'export SUITE=sid'
+ echo 'export FILESYSTEM=f2fs'
+ echo 'export FLAV=arm32-chromebook'
+ mkdir -p /home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs
+ for name in fs1 fs2 fsg fsc
+ dd if=/dev/zero bs=1M count=2 of=/home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs/modem_fs1
2+0 records in
2+0 records out
2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.001607 s, 1.3 GB/s
+ for name in fs1 fs2 fsg fsc
+ dd if=/dev/zero bs=1M count=2 of=/home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs/modem_fs2
2+0 records in
2+0 records out
2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.00186316 s, 1.1 GB/s
+ for name in fs1 fs2 fsg fsc
+ dd if=/dev/zero bs=1M count=2 of=/home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs/modem_fsg
2+0 records in
2+0 records out
2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.00172668 s, 1.2 GB/s
+ for name in fs1 fs2 fsg fsc
+ dd if=/dev/zero bs=1M count=2 of=/home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs/modem_fsc
2+0 records in
2+0 records out
2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.00154874 s, 1.4 GB/s
+ git clone https://github.com/andersson/qmic.git /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/qmic
Cloning into '/home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/qmic'...
remote: Enumerating objects: 228, done.
remote: Counting objects: 100% (131/131), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 228 (delta 83), reused 127 (delta 82), pack-reused 97
Receiving objects: 100% (228/228), 55.39 KiB | 1.73 MiB/s, done.
Resolving deltas: 100% (140/140), done.
+ git clone https://github.com/andersson/qrtr.git /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/qrtr
Cloning into '/home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/qrtr'...
remote: Enumerating objects: 449, done.
remote: Counting objects: 100% (26/26), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 449 (delta 12), reused 19 (delta 8), pack-reused 423
Receiving objects: 100% (449/449), 114.71 KiB | 1.91 MiB/s, done.
Resolving deltas: 100% (282/282), done.
+ git clone https://github.com/Maccraft123/rmtfs.git /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/rmtfs
Cloning into '/home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/rmtfs'...
remote: Enumerating objects: 222, done.
remote: Counting objects: 100% (59/59), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 222 (delta 33), reused 55 (delta 33), pack-reused 163
Receiving objects: 100% (222/222), 65.41 KiB | 1.72 MiB/s, done.
Resolving deltas: 100% (127/127), done.
+ arch-chroot /home/nathan/Desktop/O/Cadmium/tmp/root passwd -d root
passwd: password changed.
+ /home/nathan/Desktop/O/Cadmium/bootfw/depthcharge/package /dev/sdc /dev/sdc3

echo "Packaging kernel for depthcharge machines"
Packaging kernel for depthcharge machines

[ -z "$CADMIUMROOT" ] && exit 1

source "$CADMIUMROOT/config"
#!/bin/false
# TODO: fancy menu?

# Cadmium flavor
# One of: arm32-chromebook, arm32-chromebook
if [ "$RELEASE" = "" ]; then
    FLAV=arm32-chromebook
else
    FLAV=$RELEASE
fi

# RootFS type
# One of: debian, void, void-musl, arch
ROOTFS=arch

# FS type
# f2fs, ext4
FILESYSTEM=f2fs

# Debian and debian-ish distro suite (Not for arch)
# sid, testing, stable
# impish, hirsute, focal
SUITE=sid

# Which kernel should be built. disables firmware
# kernelorg: from kernel.org libre: from linux-libre.fsfla.org
KERNEL=kernelorg

# How many threads should be used for building kernel
THREADS="$(nproc)"

# Build Cadmium inside tmpfs?
IN_RAM=false
source "$CADMIUMROOT/flavor/$FLAV"
#!/bin/false
export ARCH=arm
export ARCH_UNAME=armv7l
export ARCH_DEB=armhf
export ARCH_ALARM=armv7
export CROSS_COMPILE=arm-linux-gnueabihf-

export BOOTFW=depthcharge

# sanity check
[ "$BOOTFW" != "depthcharge" ] && exit 1

cd "$CADMIUMROOT/tmp/linux-$ARCH"

[ "$ARCH" != arm ] && lz4 -z -f "arch/$ARCH/boot/Image" c_linux.lz4

# TODO: generate
cp "$CADMIUMROOT/kernel/$ARCH.kernel.its" kernel.its
cp "$CADMIUMROOT/kernel/cmdline" cmdline
cp "$CADMIUMROOT/kernel/cmdline.p2" cmdline.p2

# make kernel partition
# yes this is stolen from solidhal's prawnos, that's how open source works :D
mkimage -D "-I dts -O dtb -p 2048" -f kernel.its vmlinux.uimg || true # HACK, kernel.its needs fixing
kernel.its:5.11-13.5: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property
kernel.its:14.9-23.5: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property
kernel.its:24.9-33.5: Warning (unit_address_vs_reg): /images/fdt@2: node has a unit name, but no reg or ranges property
kernel.its:36.9-39.5: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property
kernel.its:40.9-43.5: Warning (unit_address_vs_reg): /configurations/conf@2: node has a unit name, but no reg or ranges property
Image contains unit addresses @, this will break signing
FIT description: unavailable
Created:         Sat May 14 14:17:52 2022
 Image 0 (kernel@1)
  Description:  kernel
  Created:      Sat May 14 14:17:52 2022
  Type:         Kernel Image (no loading done)
  Compression:  Unknown Compression
  Data Size:    6523528 Bytes = 6370.63 KiB = 6.22 MiB
 Image 1 (fdt@1)
  Description:  rk3288-veyron-speedy.dtb
  Created:      Sat May 14 14:17:52 2022
  Type:         Flat Device Tree
  Compression:  uncompressed
  Data Size:    49398 Bytes = 48.24 KiB = 0.05 MiB
  Architecture: ARM
  Hash algo:    sha1
  Hash value:   602a5b9ad123c351fd7e9c8e93c165114feb5839
 Image 2 (fdt@2)
  Description:  rk3288-veyron-minniedtb
  Created:      Sat May 14 14:17:52 2022
  Type:         Flat Device Tree
  Compression:  uncompressed
  Data Size:    50431 Bytes = 49.25 KiB = 0.05 MiB
  Architecture: ARM
  Hash algo:    sha1
  Hash value:   65aec896e70ad42033ceec00c70f7c4f49b39173
 Configuration 0 (conf@1)
  Description:  unavailable
  Kernel:       kernel@1
  FDT:          fdt@1
 Configuration 1 (conf@2)
  Description:  unavailable
  Kernel:       kernel@1
  FDT:          fdt@2
dd if=/dev/zero of=bootloader.bin bs=512 count=1
1+0 records in
1+0 records out
512 bytes copied, 0.000363308 s, 1.4 MB/s
vbutil_kernel --pack vmlinux.kpart \
    --version 1 \
    --vmlinuz vmlinux.uimg \
    --arch arm \
    --keyblock /usr/share/vboot/devkeys/kernel.keyblock \
    --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \
    --config cmdline \
    --bootloader bootloader.bin
vbutil_kernel: error while loading shared libraries: libflashrom.so.1: cannot open shared object file: No such file or directory

I've tried to look this up on my own to resolve this, but I've gotten both few and mixed answers; I am currently stuck.

Help would be greatly appreciated. Thank you.

Maccraft123 commented 2 years ago

That looks like issue with your distribution, or your exact installation. In the meantime you can install flashrom package as a workaround.

TheNathan0 commented 2 years ago

Thank you, it worked, but now I have a new problem. I try to start the installer to install Cadmium. The ./install gives me a prompt.

Choose your fate:
1: Installation to internal memory
2: Installation to this medium
3: Drop to shell

I selected the first option to install it to the internal EMMC. Then I get Error: No Wi-Fi device found. I cannot move forward from that. I take that the WiFi module for Minnie isn't in the GitHub repo?

Maccraft123 commented 2 years ago

ugh it broke again

TheNathan0 commented 2 years ago

Is there a workaround or quick fix I could attempt?

Maccraft123 commented 2 years ago

That looks like issue with your distribution, or your exact installation. In the meantime you can install flashrom package as a workaround.

sob., 14 maj 2022 o 20:25 TheNathan0 @.***> napisał(a):

Hi,

I attempted to cross compile Cadmium for my 32-bit ChromeBook (Veyron Minnie) recently to get an Arch Linux installer (since none were available that were already compiled) and I've ran into a problem with loading shared libraries.

I installed all the required dependencies (including the ones that were needed for the script to work but not listed on the instructions such as flex, bison, dtc, etc). I have ensured that all of my dependencies are correct for my purpose (cross compiling for my ARM32 C100P/PA).

My build machine is an upgraded (16GB RAM, SSD, etc) MacBook Pro Mid-2012 i5 (Intel). Old, but usable for this kind of task. All Arch Linux packages (including those from the AUR) are at their latest available.

I adjusted the config file as needed to ensure that it will compile for ARM32 and not ARM64.

I ran the build script to install to my USB flash drive with sudo ./build-all /dev/sdc

The script works all the way (through cross compiling, arch-chroot'ing, etc) up until it needs to interact with shared libraries; this is where it stops and gives an error that I've never encountered before.

I've cross compiled and worked with many GNU/Linux variants multiple times in the past; those being for cases similar to me trying to compile Cadmium here and I've never gotten this kind of error before.

Here's a log of what terminal threw out where my issues began:

perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_NUMERIC = "en_US.UTF-8", LC_TIME = "en_US.UTF-8", LC_MEASUREMENT = "en_US.UTF-8", LC_TELEPHONE = "en_US.UTF-8", LC_IDENTIFICATION = "en_US.UTF-8", LC_PAPER = "en_US.UTF-8", LC_MONETARY = "en_US.UTF-8", LC_NAME = "en_US.UTF-8", LC_ADDRESS = "en_US.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). (8/8) Updating the info directory file...

  • '[' kernelorg '!=' libre ']'
  • mkdir -p /home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware
  • cp -r /home/nathan/Desktop/O/Cadmium/fs/firmware/ath10k /home/nathan/Desktop/O/Cadmium/fs/firmware/brcm /home/nathan/Desktop/O/Cadmium/fs/firmware/cros-pd /home/nathan/Desktop/O/Cadmium/fs/firmware/elan_i2c_188.0.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elan_i2c_216.0.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elan_i2c_226.0.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elants_i2c_3550.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elants_i2chid_1fa6.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elants_i2chid_3463.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elants_i2chid_3464.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/keyspan /home/nathan/Desktop/O/Cadmium/fs/firmware/mrvl /home/nathan/Desktop/O/Cadmium/fs/firmware/qca /home/nathan/Desktop/O/Cadmium/fs/firmware/qcom /home/nathan/Desktop/O/Cadmium/fs/firmware/rockchip /home/nathan/Desktop/O/Cadmium/fs/firmware/rt2870.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/rt3070.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/rtl_nic /home/nathan/Desktop/O/Cadmium/fs/firmware/scp.img /home/nathan/Desktop/O/Cadmium/fs/firmware/tpm /home/nathan/Desktop/O/Cadmium/fs/firmware/vpu_d.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/vpu_p.bin /home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/
  • mkdir /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles
  • cp -r /home/nathan/Desktop/O/Cadmium/fs /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/fs
  • cp -r /home/nathan/Desktop/O/Cadmium/board /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/board
  • cp -r /home/nathan/Desktop/O/Cadmium/baseboard /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/baseboard
  • cp -r /home/nathan/Desktop/O/Cadmium/fs/install /home/nathan/Desktop/O/Cadmium/tmp/root/root/install
  • echo 'export ROOTFS=arch'
  • echo 'export ARCH_DEB=armhf'
  • echo 'export ARCH_ALARM=armv7'
  • echo 'export SUITE=sid'
  • echo 'export FILESYSTEM=f2fs'
  • echo 'export FLAV=arm32-chromebook'
  • mkdir -p /home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs
  • for name in fs1 fs2 fsg fsc
  • dd if=/dev/zero bs=1M count=2 of=/home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs/modem_fs1 2+0 records in 2+0 records out 2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.001607 s, 1.3 GB/s
  • for name in fs1 fs2 fsg fsc
  • dd if=/dev/zero bs=1M count=2 of=/home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs/modem_fs2 2+0 records in 2+0 records out 2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.00186316 s, 1.1 GB/s
  • for name in fs1 fs2 fsg fsc
  • dd if=/dev/zero bs=1M count=2 of=/home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs/modem_fsg 2+0 records in 2+0 records out 2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.00172668 s, 1.2 GB/s
  • for name in fs1 fs2 fsg fsc
  • dd if=/dev/zero bs=1M count=2 of=/home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs/modem_fsc 2+0 records in 2+0 records out 2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.00154874 s, 1.4 GB/s
  • git clone https://github.com/andersson/qmic.git /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/qmic Cloning into '/home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/qmic'... remote: Enumerating objects: 228, done. remote: Counting objects: 100% (131/131), done. remote: Compressing objects: 100% (48/48), done. remote: Total 228 (delta 83), reused 127 (delta 82), pack-reused 97 Receiving objects: 100% (228/228), 55.39 KiB | 1.73 MiB/s, done. Resolving deltas: 100% (140/140), done.
  • git clone https://github.com/andersson/qrtr.git /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/qrtr Cloning into '/home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/qrtr'... remote: Enumerating objects: 449, done. remote: Counting objects: 100% (26/26), done. remote: Compressing objects: 100% (18/18), done. remote: Total 449 (delta 12), reused 19 (delta 8), pack-reused 423 Receiving objects: 100% (449/449), 114.71 KiB | 1.91 MiB/s, done. Resolving deltas: 100% (282/282), done.
  • git clone https://github.com/Maccraft123/rmtfs.git /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/rmtfs Cloning into '/home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/rmtfs'... remote: Enumerating objects: 222, done. remote: Counting objects: 100% (59/59), done. remote: Compressing objects: 100% (26/26), done. remote: Total 222 (delta 33), reused 55 (delta 33), pack-reused 163 Receiving objects: 100% (222/222), 65.41 KiB | 1.72 MiB/s, done. Resolving deltas: 100% (127/127), done.
  • arch-chroot /home/nathan/Desktop/O/Cadmium/tmp/root passwd -d root passwd: password changed.
  • /home/nathan/Desktop/O/Cadmium/bootfw/depthcharge/package /dev/sdc /dev/sdc3

echo "Packaging kernel for depthcharge machines" Packaging kernel for depthcharge machines

[ -z "$CADMIUMROOT" ] && exit 1

source "$CADMIUMROOT/config"

!/bin/false

TODO: fancy menu?

Cadmium flavor

One of: arm32-chromebook, arm32-chromebook

if [ "$RELEASE" = "" ]; then FLAV=arm32-chromebook else FLAV=$RELEASE fi

RootFS type

One of: debian, void, void-musl, arch

ROOTFS=arch

FS type

f2fs, ext4

FILESYSTEM=f2fs

Debian and debian-ish distro suite (Not for arch)

sid, testing, stable

impish, hirsute, focal

SUITE=sid

Which kernel should be built. disables firmware

kernelorg: from kernel.org libre: from linux-libre.fsfla.org

KERNEL=kernelorg

How many threads should be used for building kernel

THREADS="$(nproc)"

Build Cadmium inside tmpfs?

IN_RAM=false source "$CADMIUMROOT/flavor/$FLAV"

!/bin/false

export ARCH=arm export ARCH_UNAME=armv7l export ARCH_DEB=armhf export ARCH_ALARM=armv7 export CROSS_COMPILE=arm-linux-gnueabihf-

export BOOTFW=depthcharge

sanity check

[ "$BOOTFW" != "depthcharge" ] && exit 1

cd "$CADMIUMROOT/tmp/linux-$ARCH"

[ "$ARCH" != arm ] && lz4 -z -f "arch/$ARCH/boot/Image" c_linux.lz4

TODO: generate

cp "$CADMIUMROOT/kernel/$ARCH.kernel.its" kernel.its cp "$CADMIUMROOT/kernel/cmdline" cmdline cp "$CADMIUMROOT/kernel/cmdline.p2" cmdline.p2

make kernel partition

yes this is stolen from solidhal's prawnos, that's how open source works :D

mkimage -D "-I dts -O dtb -p 2048" -f kernel.its vmlinux.uimg || true # HACK, kernel.its needs fixing kernel.its:5.11-13.5: Warning (unit_address_vs_reg): @.: node has a unit name, but no reg or ranges property kernel.its:14.9-23.5: Warning (unit_address_vs_reg): @.: node has a unit name, but no reg or ranges property kernel.its:24.9-33.5: Warning (unit_address_vs_reg): @.: node has a unit name, but no reg or ranges property kernel.its:36.9-39.5: Warning (unit_address_vs_reg): @.: node has a unit name, but no reg or ranges property kernel.its:40.9-43.5: Warning (unit_address_vs_reg): @.: node has a unit name, but no reg or ranges property Image contains unit addresses @, this will break signing FIT description: unavailable Created: Sat May 14 14:17:52 2022 Image 0 @.) Description: kernel Created: Sat May 14 14:17:52 2022 Type: Kernel Image (no loading done) Compression: Unknown Compression Data Size: 6523528 Bytes = 6370.63 KiB = 6.22 MiB Image 1 @.) Description: rk3288-veyron-speedy.dtb Created: Sat May 14 14:17:52 2022 Type: Flat Device Tree Compression: uncompressed Data Size: 49398 Bytes = 48.24 KiB = 0.05 MiB Architecture: ARM Hash algo: sha1 Hash value: 602a5b9ad123c351fd7e9c8e93c165114feb5839 Image 2 @.) Description: rk3288-veyron-minniedtb Created: Sat May 14 14:17:52 2022 Type: Flat Device Tree Compression: uncompressed Data Size: 50431 Bytes = 49.25 KiB = 0.05 MiB Architecture: ARM Hash algo: sha1 Hash value: 65aec896e70ad42033ceec00c70f7c4f49b39173 Configuration 0 @.) Description: unavailable Kernel: @. FDT: @. Configuration 1 @.) Description: unavailable Kernel: @. FDT: @. dd if=/dev/zero of=bootloader.bin bs=512 count=1 1+0 records in 1+0 records out 512 bytes copied, 0.000363308 s, 1.4 MB/s vbutil_kernel --pack vmlinux.kpart \ --version 1 \ --vmlinuz vmlinux.uimg \ --arch arm \ --keyblock /usr/share/vboot/devkeys/kernel.keyblock \ --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \ --config cmdline \ --bootloader bootloader.bin vbutil_kernel: error while loading shared libraries: libflashrom.so.1: cannot open shared object file: No such file or directory

I've tried to look this up on my own to resolve this, but I've gotten both few and mixed answers; I am currently stuck.

Help would be greatly appreciated. Thank you.

— Reply to this email directly, view it on GitHub https://github.com/Maccraft123/Cadmium/issues/133, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALI42AM2FNUDCY6CHW3HNVLVJ7VZ7ANCNFSM5V55FZWA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

TheNathan0 commented 2 years ago

That looks like issue with your distribution, or your exact installation. In the meantime you can install flashrom package as a workaround. sob., 14 maj 2022 o 20:25 TheNathan0 @.> napisał(a): Hi, I attempted to cross compile Cadmium for my 32-bit ChromeBook (Veyron Minnie) recently to get an Arch Linux installer (since none were available that were already compiled) and I've ran into a problem with loading shared libraries. I installed all the required dependencies (including the ones that were needed for the script to work but not listed on the instructions such as flex, bison, dtc, etc). I have ensured that all of my dependencies are correct for my purpose (cross compiling for my ARM32 C100P/PA). My build machine is an upgraded (16GB RAM, SSD, etc) MacBook Pro Mid-2012 i5 (Intel). Old, but usable for this kind of task. All Arch Linux packages (including those from the AUR) are at their latest available. I adjusted the config file as needed to ensure that it will compile for ARM32 and not ARM64. I ran the build script to install to my USB flash drive with sudo ./build-all /dev/sdc The script works all the way (through cross compiling, arch-chroot'ing, etc) up until it needs to interact with shared libraries; this is where it stops and gives an error that I've never encountered before. I've cross compiled and worked with many GNU/Linux variants multiple times in the past; those being for cases similar to me trying to compile Cadmium here and I've never gotten this kind of error before. Here's a log of what terminal threw out where my issues began: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_NUMERIC = "en_US.UTF-8", LC_TIME = "en_US.UTF-8", LC_MEASUREMENT = "en_US.UTF-8", LC_TELEPHONE = "en_US.UTF-8", LC_IDENTIFICATION = "en_US.UTF-8", LC_PAPER = "en_US.UTF-8", LC_MONETARY = "en_US.UTF-8", LC_NAME = "en_US.UTF-8", LC_ADDRESS = "en_US.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). (8/8) Updating the info directory file... + '[' kernelorg '!=' libre ']' + mkdir -p /home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware + cp -r /home/nathan/Desktop/O/Cadmium/fs/firmware/ath10k /home/nathan/Desktop/O/Cadmium/fs/firmware/brcm /home/nathan/Desktop/O/Cadmium/fs/firmware/cros-pd /home/nathan/Desktop/O/Cadmium/fs/firmware/elan_i2c_188.0.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elan_i2c_216.0.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elan_i2c_226.0.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elants_i2c_3550.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elants_i2chid_1fa6.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elants_i2chid_3463.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/elants_i2chid_3464.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/keyspan /home/nathan/Desktop/O/Cadmium/fs/firmware/mrvl /home/nathan/Desktop/O/Cadmium/fs/firmware/qca /home/nathan/Desktop/O/Cadmium/fs/firmware/qcom /home/nathan/Desktop/O/Cadmium/fs/firmware/rockchip /home/nathan/Desktop/O/Cadmium/fs/firmware/rt2870.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/rt3070.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/rtl_nic /home/nathan/Desktop/O/Cadmium/fs/firmware/scp.img /home/nathan/Desktop/O/Cadmium/fs/firmware/tpm /home/nathan/Desktop/O/Cadmium/fs/firmware/vpu_d.bin /home/nathan/Desktop/O/Cadmium/fs/firmware/vpu_p.bin /home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/ + mkdir /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles + cp -r /home/nathan/Desktop/O/Cadmium/fs /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/fs + cp -r /home/nathan/Desktop/O/Cadmium/board /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/board + cp -r /home/nathan/Desktop/O/Cadmium/baseboard /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/baseboard + cp -r /home/nathan/Desktop/O/Cadmium/fs/install /home/nathan/Desktop/O/Cadmium/tmp/root/root/install + echo 'export ROOTFS=arch' + echo 'export ARCH_DEB=armhf' + echo 'export ARCH_ALARM=armv7' + echo 'export SUITE=sid' + echo 'export FILESYSTEM=f2fs' + echo 'export FLAV=arm32-chromebook' + mkdir -p /home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs + for name in fs1 fs2 fsg fsc + dd if=/dev/zero bs=1M count=2 of=/home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs/modem_fs1 2+0 records in 2+0 records out 2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.001607 s, 1.3 GB/s + for name in fs1 fs2 fsg fsc + dd if=/dev/zero bs=1M count=2 of=/home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs/modem_fs2 2+0 records in 2+0 records out 2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.00186316 s, 1.1 GB/s + for name in fs1 fs2 fsg fsc + dd if=/dev/zero bs=1M count=2 of=/home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs/modem_fsg 2+0 records in 2+0 records out 2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.00172668 s, 1.2 GB/s + for name in fs1 fs2 fsg fsc + dd if=/dev/zero bs=1M count=2 of=/home/nathan/Desktop/O/Cadmium/tmp/root/lib/firmware/rmtfs/modem_fsc 2+0 records in 2+0 records out 2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.00154874 s, 1.4 GB/s + git clone https://github.com/andersson/qmic.git /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/qmic Cloning into '/home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/qmic'... remote: Enumerating objects: 228, done. remote: Counting objects: 100% (131/131), done. remote: Compressing objects: 100% (48/48), done. remote: Total 228 (delta 83), reused 127 (delta 82), pack-reused 97 Receiving objects: 100% (228/228), 55.39 KiB | 1.73 MiB/s, done. Resolving deltas: 100% (140/140), done. + git clone https://github.com/andersson/qrtr.git /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/qrtr Cloning into '/home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/qrtr'... remote: Enumerating objects: 449, done. remote: Counting objects: 100% (26/26), done. remote: Compressing objects: 100% (18/18), done. remote: Total 449 (delta 12), reused 19 (delta 8), pack-reused 423 Receiving objects: 100% (449/449), 114.71 KiB | 1.91 MiB/s, done. Resolving deltas: 100% (282/282), done. + git clone https://github.com/Maccraft123/rmtfs.git /home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/rmtfs Cloning into '/home/nathan/Desktop/O/Cadmium/tmp/root/CdFiles/rmtfs'... remote: Enumerating objects: 222, done. remote: Counting objects: 100% (59/59), done. remote: Compressing objects: 100% (26/26), done. remote: Total 222 (delta 33), reused 55 (delta 33), pack-reused 163 Receiving objects: 100% (222/222), 65.41 KiB | 1.72 MiB/s, done. Resolving deltas: 100% (127/127), done. + arch-chroot /home/nathan/Desktop/O/Cadmium/tmp/root passwd -d root passwd: password changed. + /home/nathan/Desktop/O/Cadmium/bootfw/depthcharge/package /dev/sdc /dev/sdc3 echo "Packaging kernel for depthcharge machines" Packaging kernel for depthcharge machines [ -z "$CADMIUMROOT" ] && exit 1 source "$CADMIUMROOT/config" #!/bin/false # TODO: fancy menu? # Cadmium flavor # One of: arm32-chromebook, arm32-chromebook if [ "$RELEASE" = "" ]; then FLAV=arm32-chromebook else FLAV=$RELEASE fi # RootFS type # One of: debian, void, void-musl, arch ROOTFS=arch # FS type # f2fs, ext4 FILESYSTEM=f2fs # Debian and debian-ish distro suite (Not for arch) # sid, testing, stable # impish, hirsute, focal SUITE=sid # Which kernel should be built. disables firmware # kernelorg: from kernel.org libre: from linux-libre.fsfla.org KERNEL=kernelorg # How many threads should be used for building kernel THREADS="$(nproc)" # Build Cadmium inside tmpfs? IN_RAM=false source "$CADMIUMROOT/flavor/$FLAV" #!/bin/false export ARCH=arm export ARCH_UNAME=armv7l export ARCH_DEB=armhf export ARCH_ALARM=armv7 export CROSS_COMPILE=arm-linux-gnueabihf- export BOOTFW=depthcharge # sanity check [ "$BOOTFW" != "depthcharge" ] && exit 1 cd "$CADMIUMROOT/tmp/linux-$ARCH" [ "$ARCH" != arm ] && lz4 -z -f "arch/$ARCH/boot/Image" c_linux.lz4 # TODO: generate cp "$CADMIUMROOT/kernel/$ARCH.kernel.its" kernel.its cp "$CADMIUMROOT/kernel/cmdline" cmdline cp "$CADMIUMROOT/kernel/cmdline.p2" cmdline.p2 # make kernel partition # yes this is stolen from solidhal's prawnos, that's how open source works :D mkimage -D "-I dts -O dtb -p 2048" -f kernel.its vmlinux.uimg || true # HACK, kernel.its needs fixing kernel.its:5.11-13.5: Warning (unit_address_vs_reg): @.: node has a unit name, but no reg or ranges property kernel.its:14.9-23.5: Warning (unit_address_vs_reg): @.: node has a unit name, but no reg or ranges property kernel.its:24.9-33.5: Warning (unit_address_vs_reg): @.: node has a unit name, but no reg or ranges property kernel.its:36.9-39.5: Warning (unit_address_vs_reg): @.: node has a unit name, but no reg or ranges property kernel.its:40.9-43.5: Warning (unit_address_vs_reg): @.: node has a unit name, but no reg or ranges property Image contains unit addresses @, this will break signing FIT description: unavailable Created: Sat May 14 14:17:52 2022 Image 0 @.) Description: kernel Created: Sat May 14 14:17:52 2022 Type: Kernel Image (no loading done) Compression: Unknown Compression Data Size: 6523528 Bytes = 6370.63 KiB = 6.22 MiB Image 1 @.) Description: rk3288-veyron-speedy.dtb Created: Sat May 14 14:17:52 2022 Type: Flat Device Tree Compression: uncompressed Data Size: 49398 Bytes = 48.24 KiB = 0.05 MiB Architecture: ARM Hash algo: sha1 Hash value: 602a5b9ad123c351fd7e9c8e93c165114feb5839 Image 2 @.) Description: rk3288-veyron-minniedtb Created: Sat May 14 14:17:52 2022 Type: Flat Device Tree Compression: uncompressed Data Size: 50431 Bytes = 49.25 KiB = 0.05 MiB Architecture: ARM Hash algo: sha1 Hash value: 65aec896e70ad42033ceec00c70f7c4f49b39173 Configuration 0 @.) Description: unavailable Kernel: @. FDT: @. Configuration 1 @.) Description: unavailable Kernel: @. FDT: @. dd if=/dev/zero of=bootloader.bin bs=512 count=1 1+0 records in 1+0 records out 512 bytes copied, 0.000363308 s, 1.4 MB/s vbutil_kernel --pack vmlinux.kpart \ --version 1 \ --vmlinuz vmlinux.uimg \ --arch arm \ --keyblock /usr/share/vboot/devkeys/kernel.keyblock \ --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \ --config cmdline \ --bootloader bootloader.bin vbutil_kernel: error while loading shared libraries: libflashrom.so.1: cannot open shared object file: No such file or directory I've tried to look this up on my own to resolve this, but I've gotten both few and mixed answers; I am currently stuck. Help would be greatly appreciated. Thank you. — Reply to this email directly, view it on GitHub <#133>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALI42AM2FNUDCY6CHW3HNVLVJ7VZ7ANCNFSM5V55FZWA . You are receiving this because you are subscribed to this thread.Message ID: @.>

Oh, I remember seeing this reply. Yes, I managed to get it building properly as I previously mentioned, even got it to boot on the device. The new issue I was encountering was the WiFi card not working (which effectively halted the install script from working), so I wasn't able to move forward besides having an offline a CLI Arch environment.

I'll try to build it again and give a closer examination at some point soon to see what might be breaking WiFi on it. I'm no expert, but I'll see what I can do.

TheNathan0 commented 2 years ago

Looks like some of the patches don't work on the newest 5.x kernel that it grabs off of GitHub.

TheNathan0 commented 1 year ago

Here's what I basically did (in summary) from what I can remember to get WiFi working (steps may be out of order); there's a chance that part or at least one of these steps may be unnecessary? Not fully sure on that:

  1. Copied the "broadcom" folder from the older kernel modules (located in the "wireless" folder) to the newer kernel's modules folder (in its "wireless" folder)
  2. Arch-chrooted into the install on another machine to install firmware-veyron
  3. Installed firmware-veyron while chrooted
  4. Booted into Cadmium, reinstalled linux-firmware
  5. Removed "brcmfmac4354-sdio.bin" from /lib/firmware/updates/brcm
  6. Rebooted

This was definitely a great help: ASUS Flip C100P wifi Broadcom 4354 detection failure

New issue we have here, installing to internal EMMC does not work at all on C100P.

This current issue (here) is closed as there's a workaround for it. A new issue was made regarding EMMC installation not working.