[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#751353: flash-kernel: Add support for TI AM335x BeagleBone (black).



Package: flash-kernel
Version: 3.20
Severity: wishlist
Tags: patch

The patch below adds support for the BeagleBone Black board.

It will require a patched u-boot, or using a uEnv.txt in order to load the boot
script on the first partition on the eMMC or microSD:

# Adjust values to taste:
device=mmc
mmcdev=0
mmcpart=2
script=/boot/boot.scr
uenvcmd=load ${device} ${mmcdev}:${mmcpart} ${loadaddr} ${script} && source ${loadaddr}

I've tested this with the u-boot shipping on current BeagleBone Black boards,
though it may not work with previous u-boot versions that shipped with the
boards. I'll work on patching the u-boot in Debian to support it without
requiring uEnv.txt.


The Machine field will also likely apply to the BeagleBone White, which uses a
different .dtb and may require other changes for flash-kernel to support it.
Not sure what exactly to do about that.


commit 314ea22d1754c92f1249bd54bb01dc8a4e441dae
Author: Vagrant Cascadian <vagrant@debian.org>
Date:   Wed Jun 11 16:13:08 2014 -0700

    Add support for TI AM335x BeagleBone (black).

diff --git a/bootscript/bootscr.beaglebone b/bootscript/bootscr.beaglebone
new file mode 100644
index 0000000..ab35a09
--- /dev/null
+++ b/bootscript/bootscr.beaglebone
@@ -0,0 +1,17 @@
+# boot script for BeagleBone
+
+setenv device mmc
+setenv partition ${mmcdev}:${mmcpart}
+setenv bootargs '@@LINUX_KERNEL_CMDLINE@@'
+
+image_locations='/boot/ /'
+kvers='@@KERNEL_VERSION@@'
+
+for pathprefix in ${image_locations}
+do
+  load ${device} ${partition} ${loadaddr} ${pathprefix}vmlinuz-${kvers} \
+  && load ${device} ${partition} ${fdtaddr} ${pathprefix}dtb-${kvers} \
+  && load ${device} ${partition} ${rdaddr} ${pathprefix}initrd.img-${kvers} \
+  && echo "Booting Debian ${kvers} from ${device} ${partition}..." \
+  && bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}
+done
diff --git a/db/all.db b/db/all.db
index ec685c2..3298328 100644
--- a/db/all.db
+++ b/db/all.db
@@ -527,6 +527,13 @@ Mtd-Kernel: kernel
 Mtd-Initrd: ramdisk
 Bootloader-Sets-Incorrect-Root: yes
 
+Machine: TI AM335x BeagleBone
+Kernel-Flavors: armmp
+DTB-Id: am335x-boneblack.dtb
+Boot-Script-Path: /boot/boot.scr
+U-Boot-Script-Name: bootscr.beaglebone
+Required-Packages: u-boot-tools
+
 Machine: Toshiba AC100 / Dynabook AZ
 Method: android
 Android-Boot-Device: /dev/mmcblk0

Attachment: signature.asc
Description: Digital signature


Reply to: