**WARNING: Support for Amlogic is old and never really evolved since the commit, using this platform isn't advised**
John Wehle did incredible amount of work to make %%FreeBSD%% run on
Amlogic %%SoC%% based boards such as Odroid-C1 and Visson ATV-102.
Currently %%FreeBSD%% successfully boots to the login prompt on an aml8726-m6
board (the box seems to be some type of Visson ATV-102) as well as on an
aml8726-m8b board (a Hardkernel ODROID-C1) using a SD card and a serial
console.
The following are supported:
* Basic machdep code
* SMP
* Interrupt controller
* Clock clock (aka gate)
* Pinctrl
* Timer
* Real time clock
* UART
* GPIO
* I2C
* SD controller
* SDXC controller
* USB
* Watchdog
* Random number generator
* PLL / Clock frequency measurement
* Frame buffer
* Gigabit ethernet
The u-boot sequence to use for the Visson ATV-102 is:
video dev open 480p
mmc rescan 0
fatload mmc 0 0x80100000 kernel.bin
go 0x80100000
The u-boot sequence to use for the Hardkernel ODROID-C1 is:
video dev open 480p
fatload mmc 0 0x100000 kernel.bin
go 0x100000
The current %%FreeBSD%% driver doesn't program the video clocks so the u-boot
video commands are necessary in order for the frame buffer to be useful
(otherwise they can be skipped).
The SD card for the Visson ATV-102 doesn't need anything special beyond
creating a FAT16 and a UFS filesystem.
The SD card for the ODROID-C1 also needs to contain the Hardkernel bootloader
as well as u-boot ...
https://people.freebsd.org/~ganbold/FreeBSD-amlogic-20150311/build/sd_freebsd_odroidc1.sh can be used to prepare the card.
Also https://people.freebsd.org/~ganbold/FreeBSD-amlogic-20150311/build/make_sd.sh can make fully working SD card with rootfs image if it was prepared before.
https://people.freebsd.org/~ganbold/FreeBSD-amlogic-20150311/build/ contains some necessary files.
https://people.freebsd.org/~sanpei/ODROID-C1/boot.ini is for u-boot and msdos partition.
Steps to prepare SD card (it assumes head src tree exists in /usr/src locally):
truncate -s 1024M odroidc1.img
mdconfig -f odroidc1.img -u0
newfs /dev/md0
mount /dev/md0 /mnt
make TARGET_ARCH=armv6 kernel-toolchain
make TARGET_ARCH=armv6 KERNCONF=ODROIDC1 buildkernel
make TARGET_ARCH=armv6 buildworld
make TARGET_ARCH=armv6 DESTDIR=/mnt installworld distribution
umount /mnt
mdconfig -d -u0
dd if=bl1.bin.hardkernel of=/dev/mmcsd0 bs=512
dd if=u-boot.bin of=/dev/mmcsd0 bs=512 seek=64 conv=sync
dd if=/dev/zero of=/dev/mmcsd0 bs=512 seek=1024 count=64
gpart destroy -F mmcsd0
gpart create -s mbr mmcsd0
gpart add -t fat16 -b 1134 -s 64M mmcsd0
gpart add -t freebsd -b 132206 mmcsd0
dd if=bl1.bin.hardkernel bs=512 count=1 of=bl1-mbr.tmp
gpart bootcode -b bl1-mbr.tmp mmcsd0
newfs_msdos -F 16 /dev/mmcsd0s1
newfs /dev/mmcsd0s2
mount -t msdosfs /dev/mmcsd0s1 /mnt
cp /usr/obj/arm.armv6/usr/src/sys/ODROIDC1/kernel.bin /mnt/
cp boot.ini /mnt
umount /mnt
dd if=/usr/src/odroidc1.img of=/dev/mmcsd0s2 bs=4096k
mount /dev/mmcsd0s2 /mnt
cp fstab /mnt/etc/
umount /mnt
growfs /dev/mmcsd0s2
The bootloader and u-boot can be obtained from the boot subdirectory of
%%ArchLinuxARM%%-odroid-c1-latest.tar.gz which is available at:
http://archlinuxarm.org/developers/downloads
The u-boot source code is available at:
https://github.com/hardkernel/u-boot/tree/odroidc-v2011.03/
which also contains a prebuilt bootloader in the sd_fuse subdirectory ...
however currently there's no prebuilt u-boot present.
The frame buffer driver is very rudimentary.
The Pinctrl driver contains just a basic set of entries ... additional
pins can be added as necessary.
The RTC on the ODROID-C1 requires the battery to be installed.
The SDXC driver works fine when controlling a SD card, it also seems
talk to the eMMC on the ODROID-C1, however more work is necessary
(some possibly at the MMC driver level) in order to support eMMC.