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,

Hello Roberte:

We are trying to do exactly the same you tried and Iā€™m wondering if you were able to succeed.

We complied UBOOT, the Kernel, etc and we are now stuck with the roofs.

If you succeeded do you have any hint on how to join the roofs with the complied uboot and kernel?

I see RobertCNelson pointed to use the image-builder scripts but Iā€™m a bit lost on how all these things are joint together.

Thanks!

You can see how I downloaded and moved the rootfs on the top of this post.

I wasnā€™t sure how to build the sd card, in the sense of partitions/etc. So I just flashed a BeagleBoard supplied image onto my SD card, then deleted all the files off the 2 partitions.

You need to move the rootfs to the sd card before the kernel stuff.

I ended up just moving away from RobertCNelson kernel, to TI 6.1 with no issues so far.

This was a major help for me

https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_00_00_03/exports/docs/linux/Foundational_Components_Kernel_Users_Guide.html#configuring-the-kernel

https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_00_00_03/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html

For anybody that runs into this post into the future. I eventually figured out(well sorta) why my image was spitting that junk out. As soon as I stop&disable NetworkManager, the issue goes away. I prefer systemd-networkd anyways, so I just ignored it. Somebody on the discord ran into this same issue too(though he is building a ā€œbalenaOSā€ image)

1 Like