FreeBSD Release-12.0 for Odroid C1+

Post Reply
level6
Posts: 19
Joined: Thu Apr 07, 2016 6:03 am
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

FreeBSD Release-12.0 for Odroid C1+

Unread post by level6 » Wed Dec 12, 2018 8:41 am

Finally FreeBSD has got a generic image for armv7
https://download.freebsd.org/ftp/releas ... CSD.img.xz

Can someone please show me the steps for merging the u-boot-odroidc with this image?

rowan194
Posts: 150
Joined: Tue Jun 02, 2015 1:43 am
languages_spoken: english
ODROIDs: C1, XU4, C2
Has thanked: 0
Been thanked: 3 times
Contact:

Re: FreeBSD Release-12.0 for Odroid C1+

Unread post by rowan194 » Mon Dec 23, 2019 1:31 am

1 year bump

Did you ever end up working it out?

I found this page by chance: https://github.com/KizzyCode/ODROID-C1-FreeBSD

There's few minor problems with the build process, like the root fs image being too small (had to increase from 1024M to 1900M to stop it running out of space), and the path of kernel.bin is wrong (on my system it's /usr/obj/usr/src/arm.armv7/sys/ODROIDC1/kernel.bin )

I'm trying to build under FreeBSD 12.1-RELEASE so perhaps there's been some changes.

Only problem is... once all that is complete, it doesn't boot. Blue LED goes on (and stays on), screen comes up, but nothing more happens.

Anyone had any luck booting FreeBSD, to do something useful, on a C1/C1+? Or any other ARM Odroid?
These users thanked the author rowan194 for the post:
level6 (Mon Dec 23, 2019 7:59 am)

level6
Posts: 19
Joined: Thu Apr 07, 2016 6:03 am
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: FreeBSD Release-12.0 for Odroid C1+

Unread post by level6 » Mon Dec 23, 2019 7:58 am

Thank you for sharing the link you found. I'll give it a try in the next days.

rowan194
Posts: 150
Joined: Tue Jun 02, 2015 1:43 am
languages_spoken: english
ODROIDs: C1, XU4, C2
Has thanked: 0
Been thanked: 3 times
Contact:

Re: FreeBSD Release-12.0 for Odroid C1+

Unread post by rowan194 » Mon Dec 23, 2019 11:30 am

I tried restoring the 12.1-RELEASE meson.dtsi file (which in the instructions uses the version from 11.1-RELEASE) and now the screen just keeps cycling on and off (boot loop?). Better than a static blank screen, but not by much. :)

Next step is to try compiling for ARMv6 (which the original wiki page says) rather than v7 (which the github page says)

I don't know enough about the intricacies of DTS files and Odroid specifics to be able to hack the GENERICSD image provided by FreeBSD, but hopefully someone does. Could be as simple as changing boot.ini and adding in a binary blob or two, on the MSDOS root file system.

FreeBSD 12.x now has the kernel config ODROIDC1 file as part of the base system, but there's no real information on how to use it.

BTW, I find it hard to believe that the base system nearly doubled in size between 12.0-RELEASE and 12.1-RELEASE, so perhaps the author of the github page updated it from an earlier version, without fully testing the build.

rowan194
Posts: 150
Joined: Tue Jun 02, 2015 1:43 am
languages_spoken: english
ODROIDs: C1, XU4, C2
Has thanked: 0
Been thanked: 3 times
Contact:

Re: FreeBSD Release-12.0 for Odroid C1+

Unread post by rowan194 » Mon Dec 23, 2019 8:07 pm

Still can't get anything useful happening. When compiling with TARGET_ARCH=armv6 (instead of armv7) the generated image seems to at least partially boot, because the ether negotiation happens, and I can see the status light flickering when an ARP request comes from another host (ARP is broadcast to all hosts), but I can't see any BOOTP/DHCP traffic initiated by the C1. For all I know it could have booted completely, but with only partial network connectivity, something which may require a quick tweak of rc.conf. With a blank screen there's no way to know its true boot state, or what I might be missing with network connectivity config...

edit: I tried this in /etc/rc.local...

Code: Select all

#!/bin/sh

echo hi > /hello.txt

date >> /hello.txt

ifconfig -a >> /hello.txt
...but /hello.txt is never created.

Not sure what else to try. I think I'll leave this for now.

===

Spoke too soon.

I found my Odroid serial cable, and IT HAS BOOTED. I've got a root command prompt on the serial console. Even weirder, once the serial cable was attached the screen started working, although it shows gibberish.

Code: Select all

---<<BOOT>>---
Copyright (c) 1992-2019 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.1-RELEASE #0 r354535M: Mon Dec 23 14:57:40 AEDT 2019
    rowan@[removed]:/usr/obj/usr/src/arm.armv6/sys/ODROIDC1 arm
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
VT: init without driver.
CPU: ARM Cortex-A5 r0p1 (ECO: 0x00000000)
CPU Features:
  Multiprocessing, Thumb2, Security, VMSAv7, Coherent Walk
Optional instructions:
  UMULL, SMULL, SIMD(ext)
LoUU:2 LoC:2 LoUIS:2
Cache level 1:
 32KB/32B 4-way data cache WB Read-Alloc Write-Alloc
 32KB/32B 2-way instruction cache Read-Alloc
real memory  = 1073737728 (1023 MB)
avail memory = 1040052224 (991 MB)
Amlogic aml8726-m8b SoC
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
[...]

Code: Select all

# top -P
last pid:    93;  load averages:  0.01,  0.09,  0.07                                                                                                                                                                 up 0+00:07:51  11:24:14
2 processes:   1 running, 1 sleeping
CPU 0:  0.0% user,  0.0% nice,  0.0% system,  1.0% interrupt, 99.0% idle
CPU 1:  0.0% user,  0.0% nice,  1.0% system,  0.0% interrupt, 99.0% idle
CPU 2:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
CPU 3:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
Mem: 1132K Active, 172K Inact, 44M Wired, 10M Buf, 950M Free
Swap:

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
   93 root          1  20    0  6392K  2736K CPU1     1   0:00   0.11% top
   57 root          1  20    0  5444K  2508K wait     0   0:00   0.00% sh
For some reason the network didn't configure (even though I set rc.conf to DHCP for dwc0 [edit: for some reason under FreeBSD the ethernet address is bogus - no valid vendor - so DHCP did work, but since the DHCP server saw an unknown ether addr it assigned another IP]), but after manually configuring the interface, I can ping.

rowan194
Posts: 150
Joined: Tue Jun 02, 2015 1:43 am
languages_spoken: english
ODROIDs: C1, XU4, C2
Has thanked: 0
Been thanked: 3 times
Contact:

Re: FreeBSD Release-12.0 for Odroid C1+

Unread post by rowan194 » Wed Dec 25, 2019 11:44 pm

I've been struggling to build an image that boots and is stable. With one combination of options I ended up with a build where I could log in, but every command was segfaulting. Anyway, I think I've finally found a suitable config. Doing some final load testing, then I'll publish a downloadable image, and a complete set of build instructions for those who wish to build their own.
These users thanked the author rowan194 for the post (total 2):
odroid (Thu Dec 26, 2019 9:35 am) • mad_ady (Sun Dec 29, 2019 8:44 pm)

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 2 guests