# BSD on Qualcomm Snapdragon



## DiscmanDaemon (Sep 17, 2016)

Hello all,
I am attempting to compile the BSD kernel for the ARM architecture Qualcomm Snapdragon 801 SOC. This in theory should be trivial since its a supported SOC:
https://www.freebsd.org/platforms/arm.html

However, my attempts so far have failed to boot. I suspect the reason is that this particular chip requires a different loadaddr be specified for the compile than other ARM chips, however Qualcomm's documentation (or lack thereof) has been unhelpful in determining the problem.

I was wondering if perhaps anyone here has any experience with this family of SOC and could possibly make suggestions. And if anyone knows the loadaddr (UBLDR_LOADADDR) needed for this chip, that would be very helpful.

Also any suggestions/experiences with the Snapdragon would be much appreciated. 

Thanks in advance


----------



## Phishfry (Sep 17, 2016)

Have you found any Linux people using Snapdragon 801. The ubldr address should be the same on all platforms using it. Maybe rummage around the other BSD's as well. The Inforce IFC6410 uses the Snapdragon cpu and is worth looking at. FreeBSD boots off it from my reading.


----------



## Phishfry (Sep 18, 2016)

Looking here I would try this address. The Snapdragon 805 is close.:
0x80200000
If that don't work try 
0x80200100

If you look at gonzo's work on the TK1 ubldr it might help you.
https://kernelnomicon.org/?p=628

I have found this wiki most helpful in a general ARM build from scratch sense.
https://wiki.freebsd.org/FreeBSD/arm/Cubieboard


----------



## Phishfry (Sep 18, 2016)

I would suggest you thoroughly investigate the following folders under FreeBSD source:
/src/sys/arm/conf --Here are platforms that should boot. These are the Arm KERNCONF files.
/src/sys/boot/arm/uboot -- Here are the uboot files. Note Gonzo patched his with an newer version from upstream.
/src/sys/boot/fdt/dts/arm/ --Here are the FreeBSD 'Device Tree Source' Files for the KERNCONF builds.
/src/sys/gnu/dts/arm/ --Here are the GNU DTS files. There is stuff in this folder that could be merged into a custom DTB.
/src/release/arm/ -- Here are the conf files used to build the current images on the website. Note the ubldr address stuff here.

Many of these files have comments in the source that need reading.


----------



## DiscmanDaemon (Sep 19, 2016)

Thanks for digging up those articles, 
Although I obviously have to wait a bit for each address I test, I suspect you have put me on the right track. Thank you for your help, and I will update on the progress.


----------

