Welcome, Guest

Author Topic: Support for Olimex AM3352-SOM in beaglebone kernel  (Read 1813 times)

vinifr

  • Full Member
  • ***
  • Posts: 239
  • Karma: +9/-0
Support for Olimex AM3352-SOM in beaglebone kernel
« on: December 09, 2015, 01:48:38 PM »
Hi Olimex,

I have submitted a patch to oficial Beaglebone kernel to support AM3352-SOM: https://github.com/beagleboard/linux/pull/53 ... I took the kernel code am335x-olimex-som.dts from Dimitar' kernel and created a am335x-som-common.dtsi based on am335x-bone-common.dtsi, to make it more acceptable patch. As I picked up the Dimitar kernel code, I added:
Signed-off-by: Dimitar Gamishev hehopmajieh@debian.bg ... I hope you do not mind  ;D
« Last Edit: December 09, 2015, 06:32:52 PM by vinifr »

vinifr

  • Full Member
  • ***
  • Posts: 239
  • Karma: +9/-0
Re: Support for Olimex AM3352-SOM in beaglebone kernel
« Reply #1 on: December 17, 2015, 10:19:23 PM »
Hi,

If anyone is interested, the patch has already been accepted: https://github.com/beagleboard/linux/commit/30796bae3b6c17830e0a162c538f803530bf8fda. Now I'm trying a defconfig: https://github.com/beagleboard/linux/pull/54.
« Last Edit: December 18, 2015, 10:09:48 PM by vinifr »

filipeisaac

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Support for Olimex AM3352-SOM in beaglebone kernel
« Reply #2 on: April 14, 2016, 06:00:19 PM »
Hello,

This patch will enable the bonecapes on AM3352? I'm having many problems with this olimex image for AM3352 and the BB capes would help a lot!

Obrigado

vinifr

  • Full Member
  • ***
  • Posts: 239
  • Karma: +9/-0
Re: Support for Olimex AM3352-SOM in beaglebone kernel
« Reply #3 on: April 14, 2016, 06:53:20 PM »
Hi,

You can use AM3352 at same way like you use Beaglebone, since we are running the same kernel. But realize that the patch was submitted to kernel 4.1, so we can not use overlay. The way to instantiate devices has changed!
« Last Edit: April 14, 2016, 06:55:31 PM by vinifr »

damancuso

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Support for Olimex AM3352-SOM in beaglebone kernel
« Reply #4 on: October 20, 2016, 10:00:06 PM »
Hi vinifr,

I'm trying to use the Beageblone kernel on the AM3352-SOM but I'm not sure exactly how to do it, I'm sorry for this newbie question but I would really appreciate some guidance here :) .
First I've tried the latest Beageblone Debian image but of course the AM3352-SOM didn't boot up for differences on the U-Boot on both boards. So then I tried flashing my SD card with the Olimex "u-boot-2013.10-ti2013.12.01-am3352_som" on the first 2048 sectors and the rootfs partition on the area above --> U-Boot starts, finds the Olimex dts file (/boot/dtbs/4.4.9-ti-r25/am335x-olimex-som.dtb) but then it fails (here is the U-Boot output: http://pastebin.com/6XvPNkhu) which I guess that makes sense because the kernel images are completely different.
Which MLO and u-boot.img binaries should I use? I don't see anything related to am335x-olimex on the latest U-Boot sources so I'm a bit lost here  :-\

Thanks in advance!!

vinifr

  • Full Member
  • ***
  • Posts: 239
  • Karma: +9/-0
Re: Support for Olimex AM3352-SOM in beaglebone kernel
« Reply #5 on: October 20, 2016, 10:15:09 PM »
Hi, here go a simple guide...

You have to use olimex bootloader, since u-boot mainline does not have support to am3352-som yet. For build olimex bootloader follow the instructions here: https://www.olimex.com/wiki/Building_Debian_AM3352_SOM (2. Building Uboot).
Another detail, you need to change u-boot init script in order to boot beaglebone kernel. uEnv.txt code

Code: [Select]
bootcmd_mmc0=setenv devnum 0; setenv rootpart 1; run mmc_boot;
mmc_boot=setenv devtype mmc; if mmc dev ${devnum}; then run mmcargs;run scan_boot; run mmcboot;setenv mmcdev 0; setenv bootpart 0:1; run mmcboot;fi
bootpart=0:1
mmcroot=/dev/mmcblk0p1 ro
fdtfile=am335x-olimex-som.dtb
loadximage=load mmc 0:1 ${loadaddr} /boot/zImage
loadxfdt=load mmc 0:1 ${fdtaddr} /boot/${fdtfile}
##loadxrd=load mmc 0:1 ${rdaddr} /boot/initrd.img-${uname_r}; setenv rdsize ${filesize}
loadall=run loadximage;  run loadxfdt;

kgdb=kgdboc=ttyS0,115200n8 kgdbwait

mmcargs=setenv bootargs console=ttyS0,115200n8 ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype} ${cmdline} cmdline=quiet init=/lib/systemd/systemd

uenvcmd=run loadall; run mmcargs; bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr};

This script expect to find zImage and am335x-olimex-som.dtb inside /boot folder. So, you must copy these files for boot from uSD. To compile beaglegone kernel:
Code: [Select]
git clone https://github.com/beagleboard/linux.git
cd linux
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bb.org_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 zImage dtbs LOADADDR=0x82000000
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 modules
make ARCH=arm INSTALL_MOD_PATH=output modules_install
The patch was submitted for beaglebone kernel 4.1. So, use 4.1 version or higher.
« Last Edit: October 20, 2016, 10:26:44 PM by vinifr »

damancuso

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Support for Olimex AM3352-SOM in beaglebone kernel
« Reply #6 on: October 20, 2016, 11:15:54 PM »
Thanks a lot! I really appreciate the support. I'll give it a try :)