# Odroid



## ronaldlees (Mar 21, 2015)

Anybody working on an Odroid port?


----------



## diizzy (Mar 21, 2015)

Yes, at least for the Odroid-C1
https://lists.freebsd.org/pipermail/freebsd-arm/2015-February/010126.html
//Danne


----------



## ganbold@ (Mar 23, 2015)

John Wehle did excellent work to make FreeBSD run on odroid-c1. I hope I can bring it to src tree.


----------



## ronaldlees (Mar 26, 2015)

That's great news.  I was thinking more along the lines of the newer chipsets - Odroid-XU, etc.  Still,  thanks for the info.


----------



## ronaldlees (Jul 28, 2015)

Well - I ended up with an Odroid C1 to start with.  I'm typing this on my Odroid C1 w/NetBSD.  Would be great to be able to use FreeBSD too!  I wonder if there's any news on this front?


----------



## ganbold@ (Jul 28, 2015)

You can use FreeBSD on Odroidc1. However dwc ethernet driver is not adapted to work for Odroidc1. But on the other hand, if you check arm@freebsd.org mailing list, you can see Daisuke-san's email about Nas4free on Odroidc1. His FreeBSD image has Ethernet driver.


----------



## ronaldlees (Jul 28, 2015)

ganbold@:  Thanks for the quick reply.  With the Odroid C1 on NetBSD, I'm using the RTL8188 USB wifi stick without trouble.  Is that likely to work on the FreeBSD Odroid port at the moment?

From `dmesg`:


```
urtwn0: Realtek 802.11n WLAN Adapter, rev 2.00/2.00, addr 4
urtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R, address 7c:dd:...
```


----------



## ganbold@ (Jul 29, 2015)

Most probably, you can try. urtwn(4) driver also exist in FreeBSD. If there are some issues I think you can ask kevlo@


----------



## ronaldlees (Aug 1, 2015)

Thanks for the quick reply again.  Well - I'll give it a try.  I'm running my C1 as a sort-of-kind-of homemade tablet with NiMH batteries, and luvin it. It's too bad that the XU3 and XU4 are completely different chips than the C1.  I'd love to get the XU4 running on one of the BSDs as well. NetBSD's port is not quite working yet for  the XU4.  The C1 port is nice though.


----------



## G.B. (Sep 15, 2015)

ronaldlees said:


> Thanks for the quick reply again.  Well - I'll give it a try.  I'm running my C1 as a sort-of-kind-of homemade tablet with NiMH batteries, and luvin it. It's too bad that the XU3 and XU4 are completely different chips than the C1.  I'd love to get the XU4 running on one of the BSDs as well. NetBSD's port is not quite working yet for  the XU4.  The C1 port is nice though.



FYI: Commit r278599 MFC'ed support for the Exynos 5420 to the kernel, which then made it in to 10.2-RELEASE.  The XU3 and XU4 are Exynos 5422-based, and as far as I can tell the only major difference is the amount of RAM.  There's no pre-built image for the EXYNOS5420 kernel config on FTP, but a custom kernel build w/ minor patches (<10 lines) and some boot loader tinkering got me a working serial console boot on my XU4.  I'll keep prodding at it, and hopefully submit patches once I can get HDMI output working.  In short: the XU3 and XU4 aren't too far away.


----------



## ronaldlees (Sep 19, 2015)

> I'll keep prodding at it, and hopefully submit patches once I can get HDMI output working. In short: the XU3 and XU4 aren't too far away.



That sounds good.  I love using the C1 (AMLogic 805), and now have a C1+ as well.  Both work very nicely with NetBSD and also with NAS4Free. They are workable tools due to their speed and higher capacities relative to rpi/rpi2/ and beagle.  XU4 is even better. Hey - maybe FreeBSD can have the XU4 before they do!


----------



## hatrix (Oct 16, 2015)

G.B. said:


> FYI: Commit r278599 MFC'ed support for the Exynos 5420 to the kernel, which then made it in to 10.2-RELEASE.  The XU3 and XU4 are Exynos 5422-based, and as far as I can tell the only major difference is the amount of RAM.  There's no pre-built image for the EXYNOS5420 kernel config on FTP, but a custom kernel build w/ minor patches (<10 lines) and some boot loader tinkering got me a working serial console boot on my XU4.  I'll keep prodding at it, and hopefully submit patches once I can get HDMI output working.  In short: the XU3 and XU4 aren't too far away.


Hi, do you have any news on the XU4 front? I'll have a new XU4 and I would absolutely LOVE having freebsdFreeBSD on it...


----------



## Phishfry (Oct 24, 2015)

Thanks -ronaldlees- for bringing this board to my attention. I bought a C1+ and it is deluxe. I am especially interested in your NiMh battery details. Is there onboard charging capability? Are you doing power monitoring?  I noticed the Android build "Pocket Rocket" has a battery app which would work i think. My first non-phone Android encounter and it is dazzling. I am thinking of rigging up a 17" touch screen for it.


----------



## Phishfry (Oct 24, 2015)

Most of the improvements to the C1+ model would be transparent except for I2S and i would seriously doubt if that is supported.

Regarding 2 NIC boards. I was trying to buy one of these until I found out what they cost:
http://www.gateworks.com/product/item/ventana-gw5310-network-processor
avnet has them but for $500..


----------



## diizzy (Oct 25, 2015)

Your best bet would be the Turris Omnia board *if* FreeBSD ever gets support, you also have the Beagleboard x15 board but it also lacks FreeBSD support. If it shares similarities with the single core Sitara SoC it might not be that hard to port however.
//Danne


----------



## ronaldlees (Oct 25, 2015)

Phishfry said:


> Thanks -ronaldlees- for bringing this board to my attention. I bought a C1+ and it is deluxe. I am especially interested in your NiMh battery details. Is there onboard charging capability? Are you doing power monitoring?  I noticed the Android build "Pocket Rocket" has a battery app which would work i think. My first non-phone Android encounter and it is dazzling. I am thinking of rigging up a 17" touch screen for it.



I think I'd be overwhelmed by a 17 inch TS!  I guess it depends on your usage pattern.  My display measures only 9 inches.  In response to getopt: I have the VU 9-inch touchscreen+HDMI display accessory.  It seems to work OK.  I don't know about the other items.  In terms of the battery, I'm using eight NiMH "C" cells (fully charged, they supply ~10.5VDC to ~11VDC) - and I run that into a high-to-low voltage DC-DC converter that has 97% efficiency in order to supply the required 5VDC for the SoC board and the VU display. Everything is fused and has over/under protection, etc. Together, they run a little over 5 hours, with moderate use of the graphics.   I have an extra external pack (another eight cells + DC-DC converter) - in a small plastic case for backup.  That way, I can operate all day long (10+ hours).

Most people use lithium cells, since the NiMH C cells are a little big (in terms of form-factor).  C size batteries take up more space in the enclosure, but my tablet case is big, and it works OK.  I'm beginning to see the NiMH cells many places (even department stores).  So - they're very easy to replace, and there's no vendor lock-in like might happen with LiPo. The trick is to keep the battery side current low.

The output v*i of the DC-DC converter is the same as the input v*i, less the inefficiency of  the converter.  So, in my case, the output v*i variables are fixed: the Odroid + VU units draw whatever current they draw at 5VDC.  On the input side, I can play all day.  I'm no battery or circuit expert, so look for that kind of advice elsewhere.  Add a bit of hobbyist's salt to all of this. Really, I wasn't quite sure where to set the ratio. The way I have it now, I have twice the voltage on the input as the output.  Thus, my output (which is fixed) runs at 1.45A, and my input runs  roughly half of that, since the efficiency is so close to 100%. So, the battery current is .75 A.

I took a cue from some of the laptop people, who use about 20 volts on the input side.  They have two or three times more current draw on the consumer side of the converter than my setup does.  It doesn't exactly level out, but it gave me a starting place.  A flashlight runs about .50 A through its batteries, and a digital camera about 1.25 A through its batteries.  Thus, my .75 A of draw is fairly light, and that's why I can get 5+ hours on each battery set.  The capacity of a battery drops with current (more than just linearly). A 5Ahr battery which is drawn down at 5A probably won't deliver the full rating.  The high current makes them inefficient. So - for the maximum run time, you minimize the battery current.  Again - add that hobbyist's salt.  I play with these hardware things as a non-expert, experimenter, tinkerer, etc. and it's not my area.  Otherwise am a dummy.  I'm sure you can come up with a better mouse trap.


----------



## ronaldlees (Oct 25, 2015)

I guess this isn't a hardware forum.  Sorry :-(


----------



## Phishfry (Oct 26, 2015)

Thanks. That was the power detail I was looking for. I considered the official UPS2 module but the wiring solution seems bulky compared to my Beaglebone Power Cape. The 3.7V Lipo batteries seem popular.
The NAS4Free install is really nice too. I am using an 128GB SSD via USB2.


----------



## Phishfry (Oct 26, 2015)

Is your 9" Screen a touchscreen? HDMI?
My 17" TS had only VGA or DVI and no HDMI. It also weighed a ton since it was an Digital Signage type with heavy stainless bezel.
I am using a 23" Vizio monitor currently with HDMI.


----------



## ronaldlees (Oct 26, 2015)

Phishfry said:


> Thanks. That was the power detail I was looking for. I considered the official UPS2 module but the wiring solution seems bulky compared to my Beaglebone Power Cape. The 3.7V Lipo batteries seem popular.
> The NAS4Free install is really nice too. I am using an 128GB SSD via USB2.



Yeah - the NAS4Free performance is decent, and it's a FreeBSD derivation   I hear FreeBSD is moving ARM to tier 1.

The official UPS2 module supplies enough juice for the SoC board, since that can work with 3.7 volts.  I've run my C1 down to about 2.8V actually, but don't recommend it    The VU LCD display and the USB devices need the 5V though, and to get that from 3.7v requires a booster - and I've found those to be grossly inefficient.  I stay away from boosters, because they really crank up the current drain on the batteries, and exhaust them quickly (partially that's because you're expecting way too much from just one or a small number of batteries at that point LOL).  For backup purposes on only the Odroid itself, I guess the UPS2 module works for a couple hours because the droid only pulls about 400 mA current. At very low currents such as that, the booster might be OK, but I usually just use a DC-DC up-to-down converter anyway. That way I can kick up the juice if I like, and not buy anything else.  You have to watch the USB peripherals you use.  Mine draw  (in total) less than a couple hundred mA, but some others can pull more, and might make the booster infeasible even when using only the Odroid, because of the high consumption USB devices.

But yeah - if you're saying even the UPS is bulky, you ain't gonna like NiMH!

BTW: the VU display I'm using has a regular HDMI connector (which is good, since that's most of my cables   )


----------



## ronaldlees (Oct 26, 2015)

If you're interested, I've put up some detail about my homemade BSD tablet at https://programmingmiscellany.wordpress.com

There's nothing commercial there, but if the mods think this is link bombing, they can pull the link :-(


----------



## Phishfry (Oct 28, 2015)

ronaldlees said:


> if you're saying even the UPS is bulky, you ain't gonna like NiMH


Well I spent the $45 and bought the UPS2 along with all the accessories I want. The cord looks soldered on so i will put a proper length cord with angle plug for minimal footprint. 

Do you know of any ARM boards with SATA supported on NAS4Free? Looks like Banana Pi might?


----------



## Phishfry (Oct 28, 2015)

diizzy said:


> Your best bet would be the Turris Omnia



Thanks -diizzy.45074- for a heads up on that design..It looks similar to the Gateworks for a fraction of the price...
Wonder if it will materialize at that price point?


----------



## ronaldlees (Oct 28, 2015)

Phishfry said:


> Well I spent the $45 and bought the UPS2 along with all the accessories I want. The cord looks soldered on so i will put a proper length cord with angle plug for minimal footprint.
> 
> Do you know of any ARM boards with SATA supported on NAS4Free? Looks like Banana Pi might?



Well, the Cubieboard looks to have a physical SATA port, but there's no image yet for NAS4Free.   I've been hankering to try the Cubieboard or Cubietruck, but haven't done it yet.  The FreeBSD/ARM collection has cubie though (but I'm not sure what shape that's in).


----------



## ronaldlees (Oct 29, 2015)

Phishfry said:


> Since we are on the topic of NAS I found a document which seems to capture the current state of the AllWinner cpu line. Sorry if it is off topic and Linux.
> http://linux-sunxi.org/Sunxi_devices_as_NAS




A couple things stand out in that report:



> Slow SATA write performance (if this problem could be solved A20 based devices would be able to easily outperform most cheap GBit capable NAS)



And, relative to Orange Pi Plus and Banana Pi M3:



> Their SoCs no longer support SATA directly.



Still, in that report I think they're saying about 50/200 MB/s (write/read) with a physical SATA port enabled A20 like Cubieboard (much more than what a SATA+USB might do). If I'm reading that correctly, then that's pretty OK. I noticed a  mail-list post where someone claimed a 35MB/s (read rate) for the Odroid C1, and I'm guessing that was mostly a USB bottleneck.  For my usage, it's really a non-issue.  What speeds are you looking for, and for what application?


----------



## Phishfry (Oct 30, 2015)

ZFS would kill that little board too, don't you think?

I am assuming you are using UFS? I am using UFS/GPT and iSCSI target. I had tried SMB/CIFS but prefer iSCSI.


----------



## ronaldlees (Oct 30, 2015)

Phishfry said:


> ZFS would kill that little board too, don't you think?



Oh yeah - about as flat as that North Carolina ribbon snake in the tire lane, that I noticed this morning on my walk.

On my droid, I'm just using the default BSD FS.

About that shipboard project - it sounds very interesting.  I wonder if it's for small craft, or bigger?  This thread is really drifting now (bad pun).


----------



## ronaldlees (Apr 11, 2016)

getopt said:


> Got an ODROID C1+.
> 
> How did you start with FreeBSD on the Odroid?
> Which image(s) can be used?
> ...



Hi Getopt:

I don't think the FreeBSD Crochet port has been updated to build the Odroid C1 image yet, so you have to create one manually (using the wiki you referenced).  Alternatively, you can get a prebuilt image of NAS4Free:

https://sourceforge.net/projects/nas4free/files/NAS4Free-ARM/10.2.0.2.2258/

The NAS4Free "build script" builds a kernel and minimal userland using the source tree (after including a few NAS oriented patches) - and then creates an image in a fashion similar to crochet.  It's  probably the only prebuilt image at this point, AFAIK ...


----------



## ronaldlees (Apr 13, 2016)

getopt said:


> FreeBSD provides these images for ARM:
> 
> I hoped for a working shortcut using/modifying one of those images.
> 
> What does it take to add one for the ODROID-C1 too?



From the ARM wiki:

"Generally you need a copy of u-boot that has been customized and compiled for your particular chip and board."

You'd also need a kernel built for the particular chip and board, so I think you wouldn't gain much advantage by doing it the way you've suggested.  It'd probably be easier just to do it from scratch.


----------



## ebike (Apr 21, 2016)

Hi Guys,

Any news of an -XU3/4 port? I have 3 of these boards all ready and waiting to try BSD on .... I already have FreeNAS running on a spare box serving up media with Plex
and I am learning heaps already, especially the differences between BSD & Linux (which I have used for 20 yrs) ..

Maybe one of the existing ports (i.e the Arndale board) could serve as a base for the port?


----------



## JNoble (Jun 12, 2016)

Good Evening. I'm new to FreeBSD but am also interested in getting it up-and-running on the XU4. I'm new to porting OS's to various devices, but I'm trying to follow the rough guidelines laid out in a few places. Particularly:

Porting FreeBSD to a new ARM Board: https://www.bidouilliste.com/blog/2015/11/27/Porting-FreeBSD-to-a-new-ARM-Board-Part-1/

as well as the Odroid Wiki. The XU4 Hardkernel wiki page links to the XU3 page for the "UBoot" section, so these are probably the same process.

From what I've gathered from that page and this thread, the sticking points will be acquiring uboot and a unique Hardkernel bootloader for the XU4. U-boot seems to have support for the Exynos 5422. I'm not sure yet how to configure it properly yet.

In my Googling I just discovered this issue of "Odroid Magazine" from November 2015, which features an article "inside the Odroid Uboot Bootloader". Looks useful, especially for noobs like myself: http://www.mclibre.org/descargar/docs/revista-odroid/odroid-23-en-201511.pdf


----------



## Stephen Horner (Jul 1, 2017)

I'll do it. Need a chance to read though. But I like freebsd too much to run linux on these. Especially since freebsd works so well on pi.


----------



## Phishfry (Jul 1, 2017)

Some Odroid stuff has made it to FreeBSD11 since this thread started.
Check out this directory for the kernconf for the Odroid C1.
/usr/src/sys/arm/conf/


----------



## Phishfry (Jul 2, 2017)

I know I didn't make it run.
From the DTS:
* Copyright (c) 2015 John Wehle <john@feith.com>

I don't see a u-boot ODROIDC1 port for FreeBSD. Only DTS and kernconf files.

Unfortunately NAS4Free pulled their ARM builds as they were not getting security updates.(Github BPi port still exists)
Using their Odroid u-boot port/patch would have worked. You can still find the old image and extract the compiled u-boot.

So actually Odroid C1 still needs manual patching up to run.
Same with the Tegra TK1. Kernel support exists but u-boot port does not.


----------



## SleepWalker (Jan 21, 2019)

Hi Guys ...
I'm trying to boot FreeBSD  on ODRIOD-HC2, but so far unsuccessfully ... 

```
U-Boot 2018.11 (Jan 10 2019 - 13:55:24 +0300) for ODROID-HC1/HC2

CPU:   Exynos5422 @ 800 MHz
Model: Odroid XU3 based on EXYNOS5422
Board: Odroid XU3 based on EXYNOS5422
Type:  hc1
DRAM:  2 GiB
MMC:   EXYNOS DWMMC: 0, EXYNOS DWMMC: 2
Loading Environment from MMC... Card did not respond to voltage select!
*** Warning - No block device, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Hit any key to stop autoboot:  2  1  0
MMC Device 1 not found
no mmc device at slot 1
Card did not respond to voltage select!
switch to partitions #0, OK
mmc2 is current device
Scanning mmc 2:1...
Found EFI removable media binary efi/boot/bootarm.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Card did not respond to voltage select!
Scanning disk mmc@12200000.blk...
Disk mmc@12200000.blk not ready
Scanning disk mmc@12220000.blk...
Found 3 disks
106292 bytes read in 14 ms (7.2 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
## Starting EFI application at 42000000 ...

>> FreeBSD EFI boot block
   Loader path: /boot/loader.efi

   Initializing modules: ZFS UFS
   Load Path: /\efi\boot\bootarm.efi
   Load Device: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(2)/SD(0)/HD(1,0x01,0,0x81f,0xfff0)
   Probing 3 block devices.....* done
    ZFS found no pools
    UFS found 1 partition
Consoles: EFI console 
|/FreeBSD/arm EFI loader, Revision 1.1

   Command line arguments: l
   EFI version: 2.70
   EFI Firmware: Das U-Boot (rev 8216.4352)
   Console: efi (0)
   Load Device: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(2)/SD(0)/HD(2,0x01,0,0x10c00,0x1bdc00)
Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(2)/SD(0)/HD(2,0x01,0,0x10c00,0x1bdc00)
Setting currdev to disk0p2:
Loading /boot/defaults/loader.conf
Loading Kernel and Modules (Ctrl-C to Abort)
.
/boot/kernel/kernel text=0x56a4e4 data=0x53274+0x5188c syms=[0x4+0x61480+0x4+0x847f2]
/boot/dtb/exynos5422-odroidhc1.dtb size=0xf112

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel] in 4 seconds...
Booting [/boot/kernel/kernel] in 3 seconds...
Booting [/boot/kernel/kernel] in 2 seconds...
Booting [/boot/kernel/kernel] in 1 second...
Booting [/boot/kernel/kernel]...               
Using DTB from loaded file '/boot/dtb/exynos5422-odroidhc1.dtb'.
Kernel entry at 0xae800180...
Kernel args: (null)
modulep: 0xc0716000
relocation_offset 0
```

Someone already tried it?


----------

