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

Bug#773890: flash-kernel: No entry for BeagleBone Black when running 3.18 kernel



On Mon, 2014-12-29 at 12:56 -0800, Vagrant Cascadian wrote:
> On 2014-12-29, Ian Campbell wrote:
> > On Mon, 2014-12-29 at 08:48 -0800, Vagrant Cascadian wrote:
> >> On 2014-12-29, Ian Campbell wrote:
> >> > could we add a check to bootscr.beaglebone which refuses to boot on a
> >> > white?  (looks like we can look at $board_name directly).
> >> 
> >> Yes, that should work. The standard boot command runs findfdt before
> >> loading the boot script. So, something along these lines:
> >
> > Thanks, lets go with this plus the one new line for the machine id then.
> > Was this snippet tested?
> 
> I tested that it works on the BeagleBone Black, and also when board_name
> is set to A335BONE, it sleeps for 10 seconds and then exits, but I don't
> have a BeagleBone white to test with.

Good enough for me, thanks.

I've pushed the patch at the end to flash-kernel.git.

> > BTW, the flash-kernel currently in experimental can run a script to
> > obtain the DTB-Id. If it is possible to programatically spot the
> > difference between the various beagle boards then that might be one way
> > to approach it in the future.
> 
> Robert Nelson pointed out that the BeagleBone white has 256MB of ram,
> and the BeagleBone Black all have 512MB of ram, so /proc/meminfo is a
> pretty reliable test:
> 
>   memtotal=$(awk '/MemTotal:/{print $2}' /proc/meminfo)
>   test "$memtotal" -lt "300000" && echo white || echo black

Thanks, lets try and remember this if someone shows up asking for White
support...

Cheers,
Ian.

commit 053b567dd81a206bd478281d714298d5c71c24d1
Author: Ian Campbell <ijc@debian.org>
Date:   Mon Dec 29 23:22:02 2014 +0000

    Support for alternative machine name for BeagleBone Black.
    
    The old name was ambiguous with the original BeagleBone (often called "White"),
    detect if booting on a BeagleBone white and print an error since the DTB will
    be wrong. We don't currently support the White. (Closes: #773890, which
    contains full background).

diff --git a/bootscript/bootscr.beaglebone b/bootscript/bootscr.beaglebone
index a0e5121..1d079f8 100644
--- a/bootscript/bootscr.beaglebone
+++ b/bootscript/bootscr.beaglebone
@@ -1,4 +1,14 @@
-# boot script for BeagleBone
+# boot script for BeagleBone Black
+
+# BeagleBone white uses a different .dtb file, and flash-kernel is
+# currently unable to support multiple .dtb files.
+if test "${board_name}" = "A335BONE"
+then
+  echo "BeagleBone white detected, unsupported platform."
+  echo "Exiting in 10 seconds..."
+  sleep 10
+  exit
+fi
 
 setenv device mmc
 setenv partition ${bootpart}
diff --git a/db/all.db b/db/all.db
index 1d4686c..bed551c 100644
--- a/db/all.db
+++ b/db/all.db
@@ -581,6 +581,7 @@ Mtd-Initrd: ramdisk
 Bootloader-Sets-Incorrect-Root: yes
 
 Machine: TI AM335x BeagleBone
+Machine: TI AM335x BeagleBone Black
 Kernel-Flavors: armmp
 DTB-Id: am335x-boneblack.dtb
 Boot-Script-Path: /boot/boot.scr
diff --git a/debian/changelog b/debian/changelog
index 152b984..2095326 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,10 @@ flash-kernel (3.30) UNRELEASED; urgency=medium
 
   [ Ian Campbell ]
   * Support for TI OMAP5 uEVM board (Patch from Chen Baozi, Closes: #773255)
+  * Support for alternative machine name for BeagleBone Black. The old name was
+    ambiguous with the original BeagleBone (often called "White"), detect if
+    booting on a BeagleBone white and print an error since the DTB will be
+    wrong. We don't currently support the White. (Closes: #773890)
 
   [ Karsten Merker ]
   * Add a machine db entry for the LinkSprite pcDuino3


Reply to: