Running into issues building my own image

So I am trying to recreate https://rcn-ee.com/rootfs/release/2023-08-05/bookworm-minimal-arm64/beagleplay-debian-12.1-minimal-arm64-2023-08-05-6gb.img.xz exactly on my own

As I understand, there are 3 main things

  1. U-Boot
  2. rootfs
  3. Kernel

U-Boot

git clone https://github.com/beagleboard/repos-arm64.git
cd repos-arm64/bb-u-boot-beagleplay/suite/bookworm/debian/
git checkout 935e80fb8dc2eb72c6b39b79efe09d74897e298b
sudo make -f rules override_dh_auto_configure

I end up with 4 files that I need to move, one being a .dtb that needs to be renamed

sudo cp tmp/k3-image-gen/tiboot3.bin /media/BOOT
sudo cp tmp/a53/tispl.bin /media/BOOT
sudo cp tmp/a53/u-boot.img /media/BOOT
sudo cp tmp/a53/u-boot.dtb /media/BOOT/k3-am625-beagleplay.dtb

I need to create the extlinux directory and add the extlinux.conf file

sudo mkdir /media/BOOT/extlinux
sudo nano /media/BOOT/extlinux/extlinux.conf

and include the following

menu title BeaglePlay microSD Boot Options

timeout 50

default Linux microSD (default)

label BeaglePlay Recovery
    kernel /Image
    append root=/dev/mmcblk1p2 ro rootfstype=ext4 rootwait net.ifnames=0
    fdtdir /
    initrd /initrd.img

label BeaglePlay disable BCFSERIAL
    kernel /Image
    append root=/dev/mmcblk1p2 ro rootfstype=ext4 rootwait net.ifnames=0
    fdtdir /
    fdtoverlays /overlays/k3-am625-beagleplay-bcfserial-no-firmware.dtbo
    initrd /initrd.img

label Linux microSD (default)
    kernel /Image
    append root=/dev/mmcblk1p2 ro rootfstype=ext4 rootwait net.ifnames=0 quiet
    fdtdir /
    #fdtoverlays /overlays/<file>.dtbo
    #initrd /initrd.img
    #needed to comment this because initrd.img doesn't exist yet?

Root FS

wget https://rcn-ee.com/rootfs/eewiki/minfs/debian-12.1-minimal-arm64-2023-08-22.tar.xz
tar xf debian-12.1-minimal-arm64-2023-08-22.tar.xz
sudo tar xfvp debian-12.1-minimal-arm64-2023-08-22/arm64-rootfs-debian-bookworm.tar -C /media/rootfs

Ideally, this would be 2023-08-05 as that’s what I’m trying to recreate. But I don’t think that would matter

I need to edit fstab so that the system isn’t in a “read-only” state

sudo nano /media/rootfs/etc/fstab

and include the following

/dev/mmcblk1p2  /  ext4  noatime,errors=remount-ro  0  1
/dev/mmcblk1p1  /boot/firmware vfat defaults 0 0
debugfs  /sys/kernel/debug  debugfs  mode=755,uid=root,gid=gpio,defaults  0  0

Kernel

git clone https://github.com/RobertCNelson/ti-linux-kernel-dev
cd /ti-linux-kernel-dev
git checkout origin/ti-linux-arm64-5.10.y -b tmp
./build_kernel.sh

When it pops up a GUI to set custom options, I just press next/continue and don’t choose any custom items

I end up with 3 files under deploy/

  1. 5.10.168-ti-arm64-r108.Image
  2. 5.10.168-ti-arm64-r108-dtbs.tar.gz
  3. 5.10.168-ti-arm64-r108-modules.tar.gz
sudo cp deploy/5.10.168-ti-arm64-r108.Image /media/BOOT/Image
sudo mkdir -p /media/rootfs/boot/dtbs/5.10.168-ti-arm64-r108
sudo tar xfv deploy/5.10.168-ti-arm64-r108-dtbs.tar.gz -C /media/rootfs/boot/dtbs/5.10.168-ti-arm64-r108/

sudo tar xfv deploy/5.10.168-ti-arm64-r108-modules.tar.gz -C /media/rootfs/usr/

Then I insert the SD card into the BeaglePlay… It boots up just fine, I’m connected to it via the 3-pin serial debug header , but spits out errors and seems to be missing stuff such as being able to access the BeaglePlay from my laptop via 192.168.7.2.

The random errors that its periodically spitting out appear to be associated with networking in some way?

What have I missed? I’ve attached ‘dmesg’ output, as well as what the boot process shows

dmesg.txt (69.8 KB)
boot.txt (5.7 KB)

As I am aware, nobody has written up a document like this…

Thanks,
Robert

wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin

wlan0 isn’t happy with the missing firmware…

if eth0 works install this package: bb-wl18xx-firmware

Regards,

you had to do this exact thing when you built the image that’s listed for download?

eth0 doesnt work. I created eth0.network, but when I attempt to bring up the interface, it states No such device

Did I grab a wrong branch/repo/etc? I would think that all this would be working from the start

Nope… Your the first to try… You asked for a base image on 12.1, so i generated one for you…

I have not taken the time yet to write up a step by step for the BeaglePlay…

There be dragons!

That 12.1 base image has network-manager enabled, try nmcli?

Regards,

Nope… Your the first to try… You asked for a base image on 12.1, so i generated one for you…

Maybe I’m confused, I thought that you would have used the base image(min-rootfs that I requested). What image did you use?

Thank you for your help!

No, every single time i told you to use a specific Image, you said no, you wanted an image that was based on what i had done here: Index of /rootfs/eewiki/minfs

So I ported exactly what i had used for the last Debian 11.s (Bullseye) image and gave you a Debian 12.x (Bookworm) version.

So yeah, completely un-tested by me, but exactly what you wanted…

You can find the “BeaglePlay” 12.1 minimal image here: Index of /rootfs/release/2023-08-05/bookworm-minimal-arm64

Regards,

That link contains the same images that are listed on ARM64 - Debian 12.x (Bookworm) - Monthly Snapshots - 2023-08-05

You flash it to an SD card, and boom the BeaglePlay is up and running as normal.

Which is what I’m trying to build on my own.

When you built the image(thats listed on both ARM64 - Debian 12.x (Bookworm) - Monthly Snapshots - 2023-08-05 and Index of /rootfs/release/2023-08-05/bookworm-minimal-arm64), what rootfs file did you use? You had to have started somewhere, and you definitely didn’t start with the final product/image no?

Thanks

That rootfs is generated from here:

git clone https://git.beagleboard.org/beagleboard/image-builder.git
cd ./image-builder/
./RootStock-NG.sh -c bb.org-debian-bookworm-minimal-v5.10-ti-arm64-k3-am62

Then from that output, i generate an image file via:

sudo ./setup_sdcard.sh --img-6gb beagleplay-${export_filename} --dtb beagleplay --hostname BeaglePlay

and upload that…

Regards,