🛠 Développement noyau : extlinux sur FAT32 et contournement de l'erratum i2329
Objectives
Iterate quickly on a custom kernel for the BeaglePlay (TI AM625): the boot partition is a FAT32 (mmcblk0p1) read by U-Boot via extlinux, allowing you to swap kernels from any PC without reflashing. Two notable constraints: the boot chain expects an uncompressed Image kernel, and the AM62x family silicon erratum i2329 requires driving MDIO via GPIO bit-banging instead of the hardware MDIO controller, depending on the Ethernet port configuration. We integrate the workaround via an overlay.
Hardware
- A BeaglePlay board booting from SD or eMMC
- An aarch64 cross-build PC with kernel build packages
- Reliable serial or SSH access (risk of kernel panic)
Complete Code
# 1. Monter la partition de boot FAT32
sudo mkdir -p /mnt/boot && sudo mount /dev/mmcblk0p1 /mnt/boot
cat /mnt/boot/extlinux/extlinux.conf
# 2. Config et build (noyau non compressé)
make ARCH=arm64 defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc) Image dtbs
# 3. Déployer sur la FAT
sudo cp arch/arm64/boot/Image /mnt/boot/Image-dev
sudo cp arch/arm64/boot/dts/ti/k3-am625-beagleplay.dtb /mnt/boot/dtbs/
# 4. Nouveau label dans extlinux.conf
# label dev
# linux /Image-dev
# fdtdir /dtbs/
# fdtoverlays /overlays/k3-am625-beagleplay-mdio-bitbang.dtbo # erratum i2329
# append root=PARTUUID=... rootwait console=ttyS2,115200n8
sudo umount /mnt/boot && sudo reboot
Expected Verification
In the extlinux menu, the dev label boots the custom kernel: uname -a displays the local version, dmesg shows the MDIO probe using GPIO bit-banging instead of the hardware controller, and the Ethernet link comes up normally. Reverting to the factory kernel is done by selecting the other label — since the FAT partition is readable from the PC, no reflash is needed to roll back.
Common Errors
- Deploying a bare
Image.gz: the boot chain does not decompress it, so nothing starts after selecting the label. - Editing the extlinux config on the SD card while having rebooted on eMMC (or vice versa): the kernel does not change, leading you to believe the build is broken.
- Ignoring erratum i2329 on a configuration that triggers it: the PHY stops responding on the hardware MDIO, there is no Ethernet link, and hours are wasted debugging cables.
- Removing
rootwaitfrom the append line: the root filesystem does not have time to appear, causing anUnable to mount rootpanic. - Working without a serial console: at the first oops, you have no way to understand why.
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash