BeagleBone AI

Oskar Holmlund oskar.holmlund at yahoo.com
Thu Jun 11 06:25:07 UTC 2020








Den lördag 30 maj 2020 20:09:04 CEST, Oskar Holmlund <oskar.holmlund at yahoo.com> skrev: 





Hello Rolf,


Den lördag 30 maj 2020 04:22:12 CEST, Dr. Rolf Jansen <freebsd at cyclaero.com> skrev: 

We are starting a new project of industrial device controllers. We want to utilize ARM-SBCs as unit controllers (and here a unit is one industrial device), and we need to attach at least 24 ADCs, 8 DACs and 16 DIOs to each unit controller (UC). Many unit controllers (eventually tenths to hundreds) would then communicate by a custom protocol over ethernet with a command and control server. The UCs and the C&C server would be operated by FreeBSD. Direct interoperability of the UCs with 3rd party IT systems is not a concern, integration needs to be done via the C&C server.  

Since the sample/update rate requirements are quite low, we are going the I²C path, and initial testing has been done using the BeagleBone Black. It got 2 separate I²C 400 kbit/s busses which helps already, avoiding I²C address conflicts. Yet, the 8 port I²C switch TCA9548A is working very well, and we are now sure to be able to attach enough ADCs, DACs and DIOs to each unit controller.

Although the initial viability tests were done with a BeagleBone Black running FreeBSD 13-CURRENT, we could start with another more modern SBC.

First Question:

What modern SBC with more than 1 I²C bus and which can run FreeBSD 13++ would you suggest?


Now recently, I found the BeagleBone AI site https://beagleboard.org/ai/ <https://beagleboard.org/ai/>. This one got also 2 I²C busses, and physically, with respect to a housing, it could be a 1:1 replacement for a BBB. It seems, this one is still too new for FreeBSD. I am very fond of the BB concept - for me it is much more appealing for industrial embedded applications than for example any RPI. However, the BBB came to age, and I would start a new project with it only, if there would be a reasonable chance for an upgrade path.

Two more Questions:

Is it reasonable to assume that FreeBSD would run on a BBAI in the future, let’s say in 2 to 3 years?

Perhaps I could help porting FreeBSD to a BBAI. What would be the general steps?


Many thanks in advance for any suggestions, advices and clarifications.

Best regards

Rolf
_______________________________________________
freebsd-arm at freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"

I'm also into industrial embedded systems, we currently use am3358 and in our roadmap we have a plan to use am57xx in the future. We build our own custom hardware and dont use Beaglebone* in the products.

First question; have a quick look at the hardware documentation from the SoCs vendor listed in sys/arm and sys/arm64. If you like the structure of the documentation talk to the vendor and see if you can get the product life time your project needs, do the support organisation give some kind of design review of schematics...do the support organisation "know" something about the BSDs? :)
I think its good if you can fix problems in the future on your own due to the lack of manpower in freebsd at arm as both Ian Lepore and Emmanuel Vadot has pointed out several times. 

Steps to get AM57xx SoCs to work:
1 Print the schematics and parts of the documentation ( https://www.ti.com/lit/ug/spruhz6l/spruhz6l.pdf ) on paper.
2 Find marking pens.
3 Build & boot u-boot - probably easy check out ports/sysutils/u-boot-* change model/board_config maybe some patches are needed.
4 Dive into the devicetree (moving target and not always correct) and understand the concept. The relationship between different parts of the system and the documentation, find the registers & bits you need and issue read/write (maybe some glue are needed aswell). 
5 Write new/rewrite drivers.
6 goto (4)

It will probably take a year or two to have stable support for am57xx. If you have time to work on making freebsd boot on BBAI it will be great - maybe we can get it done in 6 months ? :)

I will put up an initial proposal for am335x clock on reviews.freebsd.org as soon as my account has been approved. Head boots and i have tested most of the function except PRUs. 
I assume am57xx/dra7xx have some new type of clock/dpll but it should not be too hard to add.

//Oskar

 

I had to test booting freebsd on beagleboard x15, issues:
* Build uboot - ofcourse am3xxx, am4xxx and am65xx has support for distro bootcmd, but not am57xx
https://gitlab.denx.de/u-boot/u-boot/blob/master/doc/README.distro
(Used for loading bootarm.efi)
I have to cleanup to share, at the moment i just hacked something into include/config_distro_bootcmd.h.


Loading the kernel seems to "work" but...

U-Boot SPL 2020.04 (Jun 11 2020 - 08:41:27 +0200)
DRA752-GP ES2.0
Trying to boot from MMC1
no pinctrl state for default mode
Loading Environment from FAT... no pinctrl state for default mode
*** Warning - bad CRC, using default environment

Loading Environment from MMC... *** Warning - bad CRC, using default environment



U-Boot 2020.04 (Jun 11 2020 - 08:41:27 +0200)

CPU  : DRA752-GP ES2.0
Model: TI AM5728 BeagleBoard-X15 rev C
Board: BeagleBoard X15 REV C.00
DRAM:  2 GiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

Loading Environment from MMC... *** Warning - bad CRC, using default environment

Net:   
Warning: ethernet at 48484000 using MAC address from ROM
eth0: ethernet at 48484000
Hit any key to stop autoboot:  0
## Error: "init_console" not defined
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
193669 bytes read in 11 ms (16.8 MiB/s)
Found EFI removable media binary efi/boot/bootarm.efi
Scanning disk mmc at 4809c000.blk...
** Unrecognized filesystem type **
Scanning disk mmc at 480b4000.blk...
Found 5 disks
BootOrder not defined
EFI boot manager: Cannot load any image
518488 bytes read in 26 ms (19 MiB/s)
Consoles: EFI console  
    Reading loader env vars from /efi/freebsd/loader.env
Setting currdev to disk0p1:
FreeBSD/arm EFI loader, Revision 1.1
(Thu Jun 11 09:48:19 CEST 2020 oskarh at maker.ohdata.se)

   Command line arguments: l
   Image base: 0xfce90000
   EFI version: 2.80
   EFI Firmware: Das U-Boot (rev 8224.1024)
   Console: comconsole (0)
   Load Path: /efi\boot\bootarm.efi
   Load Device: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(1,0x01,0,0x3f,0xfff0)
Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(1,0x01,0,0x3f,0xfff0)
Setting currdev to disk0p1:
Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(2,0x01,0,0x10400,0x56e400)
Setting currdev to disk0p2:
Loading /boot/defaults/loader.conf
Loading /boot/defaults/loader.conf
Loading /boot/device.hints
Loading /boot/loader.conf
Loading /boot/loader.conf.local
c[H[J[8;48H  [31m```                        [31;1m`[31m[9;48H s` `.....---...[31;1m....--.```   -/[31m[10;48H +o   .--`         [31;1m/y:`    
  +.[31m[11;48H  yo`:.            [31;1m:o      `+-[31m[12;48H   y/               [31;1m-/`   -o/[31m[13;48H  .-                  [31;1m::/sy+
:.[31m[14;48H  /                     [31;1m`--  /[31m[15;48H `:                          [31;1m:`[31m[16;48H `:                          [31;1
m:`[31m[17;48H  /                          [31;1m/[31m[18;48H  .-                        [31;1m-.[31m[19;48H   --                      [31;1m-
.[31m[20;48H    `:`                  [31;1m`:`[21;48H      [31;1m.--             `--.[22;48H         .---.....----.[m[1;2H  ______            
   ____   _____ _____  [2;2H |  ____|             |  _ \ / ____|  __ \ [3;2H | |___ _ __ ___  ___ | |_) | (___ | |  | |[4;2H |  ___| '__/ _ \/
 _ \|  _ < \___ \| |  | |[5;2H | |   | | |  __/  __/| |_) |____) | |__| |[6;2H | |   | | |    |    ||     |      |      |[7;2H |_|   |_|  \___
|\___||____/|_____/|_____/ [9;2H+[22;2H+[9;44H+[22;44H+[9;3H-----------------------------------------[22;3H-----------------------------------
------[10;2H|[10;44H|[11;2H|[11;44H|[12;2H|[12;44H|[13;2H|[13;44H|[14;2H|[14;44H|[15;2H|[15;44H|[16;2H|[16;44H|[17;2H|[17;44H|[18;2H|[18;44H|[
19;2H|[19;44H|[20;2H|[20;44H|[21;2H|[21;44H|[9;14HWelcome to FreeBSD[11;5H1. [1mB[22moot Multi user [1m[Enter][22m[12;5H2. Boot [1mS[22mingle
user[13;5H3. [1mEsc[22mape to loader prompt[14;5H4. [1mR[22meboot[15;5H[16;5HOptions:[17;5H5. [1mK[22mernel
: default/[32mkernel[39m (1 of 1)[18;5H6. Boot [1mO[22mptions[25;0H[23;4HAutoboot in 4 seconds, hit [Enter] to boot or any other key to stop
[25;0H[23;4HAutoboot in 2 seconds, hit [Enter] to boot or any other key to stop     
[25;0H[23;4HAutoboot in 1 seconds, hit [Enter] to boot or any other key to stop     
[25;0H[23;4HAutoboot in 0 seconds, hit [Enter] to boot or any other key to stop     
[25;0HLoading kernel...
/boot/kernel/kernel text=0x72bc74 data=0x83df0 data=0x0+0x224000 syms=[0x4+0x84a30+0x4+0xe7d91]
Loading configured modules...
/boot/entropy...can't find '/boot/entropy'
failed!
/etc/hostid...can't find '/etc/hostid'
failed!
Using DTB provided by EFI at 0x87ecd000.
Kernel entry at 0xf7000180...
a Kernel args: (null)
after bi_load
after di_cleanup

added the last two printfs __elfN() in /usr/src/stand/efi/loader/arch/arm/exec.c


//Oskar



More information about the freebsd-arm mailing list