March 4, 2020

The Beaglebone Black

Installing Debian 9.5 on a BBB rev C

I discover that Debian 9.5 is available as a "flasher" image and I am downloading that as I type this. My first BBB came with the Angstrom distribution, which was simply awful. My experiences with Debian, even back in 2014 were much better and it will be interesting so see what an up to date debian is like on the BBB.

I have my choice of the most up to date images, which run only from SD, as well as IoT images (which have no graphical desktop, and are what I want) or several images with a graphical desktop, which I simply ignore.

I download BBB-blank-debian-9.5-iot-armhf-2018-10-07-4gb.img.xz which is 519 Mb in size. Can I flash this onto a BBB with only 2G of eMMC? Does the unit sitting on my desk have 2G or 4G? The hint is in the name (the -4gb) and indeed, when I run unxz on this, I get a 3.6G image. And I don't see any 2G images at all in the latest firmware collection, so the question is how much eMMC is on this card I am holding.

I dig up my USB to serial dongle, verify that it is /dev/ttyUSB0 and start picocom via:

picocom -b 115200 /dev/ttyUSB0
This particular unit has U-Boot set up for diskless booting from when I was working with Xinu, so I can't just boot into linux and check partition sizes.

Apparently it is easy though, the sticker on the side will have a big "C" if it is a rev C unit with 4G of eMMC. Mine says "A5B" which means it is rev A apparently and has only 2G. All the rest of my units have "B" marked on them. This means that I will have to run a recent image from SD card, or find a different unit.

I do have two other units from an Ebay purchase in snazzy black metal cases. I open these up and see a Kingston KE4CN2H5A chip, and this is a 4G eMMC flash, so apparently these are rev C units and will work. No big "C" on the label. The silkscreen does say "element14" on this one, which is new to me, and may be indicative of a rev C unit.

I plug a 16G micro-SD card into my card reader and give the command:

dd if=BBB-blank-debian-9.5-iot-armhf-2018-10-07-4gb.img of=/dev/sdf bs=16M
I dig out my 5V/2A power supply and connect it to the coaxial connector on the BBB. We continue to use the serial console to keep an eye on things. The SD card goes into the slot. We hold down the S2/"Boot" button (near the SD slot) while we plug in the power supply and continue to hold it down while we watch linux boot from the flasher SD card. As soon as the LED's begin to flash and linux begins to boot, we can let go of the S2 button. After some initialization, the lights go to a back and forth pattern while flashing takes place. There are lots of interesting messages on the console. It powers off when done.

If you want to look at all the messages from the flasher, here you go:

Once this finishes, I will be curious to see how much "disk space" is really required. Since I just want a minimal IoT system, it ought to be possible to fit it into 2G. How hard could it be to trim things down and set up a 2G flasher image?

I remove the SD card and hit the power button, and it boots from eMMC!

-Boot SPL 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500)
...
Debian GNU/Linux 9 beaglebone ttyS0

BeagleBoard.org Debian Image 2018-10-07

Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian

default username:password is [debian:temppwd]

beaglebone login:
I use "sudo su" to become root and start looking around.
root@beaglebone:/home/debian# df
Filesystem     1K-blocks    Used Available Use% Mounted on
udev              220136       0    220136   0% /dev
tmpfs              49488    5376     44112  11% /run
/dev/mmcblk1p1   3647540 1959908   1482628  57% /
tmpfs             247436       0    247436   0% /dev/shm
tmpfs               5120       4      5116   1% /run/lock
tmpfs             247436       0    247436   0% /sys/fs/cgroup
tmpfs              49484       0     49484   0% /run/user/1000
The fact that we are using 57 percent of a 3.6G filesystem does suggest that we are just over the edge from what could fit on a 2G unit.

Also I am curious about what kernel drivers support the PRU in modern systems. Here is a list trimmed to only include those things that seem PRU related.

lsmod
Module                  Size  Used by
pruss_soc_bus          16384  0
evdev                  24576  1
uio_pdrv_genirq        16384  0
uio                    20480  1 uio_pdrv_genirq
pru_rproc              28672  0
pruss                  16384  1 pru_rproc
pruss_intc             16384  1 pru_rproc
It looks like a lot has changed from when I used to see only uio_pruss. This will take some looking into.

Enough for one day.


Feedback? Questions? Drop me a line!

Tom's Computer Info / [email protected]