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.
> 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
live well,
vagrant
signature.asc
Description: PGP signature

