Parallella - FreeBSD
hardware info on main Parallella page.
links
FreeBSD wiki: arm/Zedboard, skibo.net: FreeBSD on Zynq-7000 / Zybo / Zedboard, Parallella, Github parallella-uboot, parallella-fpga, parallella-utils, parallella-flash, parallella-devenv, parallella-riscv,
local links
c1,
History
2021-08-14: I re-created this page on my self-hosted web server.
2019-07-30: from this mailing list post it seems you can reprogram the FPGA (on the fly!) like this: "cat system.bit.bin > /dev/devcfg0". That is nice.
2016-01-21: boot test - I still have my serial console attached (Dev/cuaU0 speed 115200). Test if it boots (capture from serial console)
U-Boot 2012.10-00003-g792c31c (Jan 03 2014 - 12:24:08) I2C: ready DRAM: 992 MiB WARNING: Caches not enabled MMC: SDHCI: 0 SF: Detected N25Q128 with page size 64 KiB, total 16 MiB In: serial Out: serial Err: serial Net: zynq_gem Hit any key to stop autoboot: 0 Configuring PL and Booting Linux... Device: SDHCI Manufacturer ID: 41 OEM: 3432 Name: SD8GB Tran Speed: 50000000 Rd Block Len: 512 SD version 2.0 High Capacity: Yes Capacity: 7.4 GiB Bus Width: 4-bit reading parallella.bit.bin ** Unable to read "parallella.bit.bin" from mmc 0:1 ** Error: Timeout waiting for FPGA to config. fpga - loadable FPGA image support Usage: fpga [operation type] [device number] [image address] [image size] fpga operations: dump [dev] Load device to memory buffer info [dev] list known device information load [dev] [address] [size] Load device from memory buffer loadb [dev] [address] [size] Load device from bitstream buffer (Xilinx only) loadmk [dev] [address] Load device generated with mkimage For loadmk operating on FIT format uImage address must include subimage unit name in the form of addr:<subimg_uname> reading uImage 8170816 bytes read reading devicetree.dtb 4430 bytes read ## Booting kernel from Legacy Image at 03000000 ... Image Name: parallella-freebsd Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 8170752 Bytes = 7.8 MiB Load Address: 00100000 Entry Point: 00100100 Verifying Checksum ... OK ## Flattened Device Tree blob at 02a00000 Booting using the fdt blob at 0x02a00000 Loading Kernel Image ... OK OK Loading Device Tree to 1fffb000, end 1ffff14d ... OK Starting kernel ... Copyright (c) 1992-2016 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 11.0-RELEASE-p5 #0 r309692: Sun Jan 15 18:07:24 PST 2017 freebsd@ashbury:/usr/home/skibo/crochet-freebsd/work/obj/arm.armv6/usr/src/sys/PARALLELLA arm FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) CPU: Cortex A9-r3 rev 0 (Cortex-A core) Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext WB enabled LABT branch prediction disabled LoUU:2 LoC:2 LoUIS:2 Cache level 1: 32KB/32B 4-way data cache WB Read-Alloc Write-Alloc 32KB/32B 4-way instruction cache Read-Alloc real memory = 1040183296 (991 MB) avail memory = 1008218112 (961 MB) FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs random: entropy device external interface ofwbus0: <Open Firmware Device Tree> simplebus0: <Flattened device tree simple bus> on ofwbus0 simplebus1: <Flattened device tree simple bus> on ofwbus0 l2cache0: <PL310 L2 cache controller> mem 0xf02000-0xf02fff on simplebus0 l2cache0: cannot allocate IRQ, not using interrupt l2cache0: Part number: 0x3, release: 0x8 l2cache0: L2 Cache enabled: 512KB/32B 8 ways gic0: <ARM Generic Interrupt Controller> mem 0xf01000-0xf01fff,0xf00100-0xf001ff on simplebus0 gic0: pn 0x390, arch 0x1, rev 0x2, implementer 0x43b irqs 96 mp_tmr0: <ARM MPCore Timers> mem 0xf00200-0xf002ff,0xf00600-0xf0061f on simplebus0 Timecounter "MPCore" frequency 333333333 Hz quality 800 Event timer "MPCore" frequency 333333333 Hz quality 1000 zy7_slcr0: <Zynq-7000 slcr block> mem 0-0xfff on simplebus0 zy7_devcfg0: <Zynq devcfg block> mem 0x7000-0x7fff on simplebus0 uart0: <Cadence UART> mem 0x1000-0x1fff on simplebus1 uart0: console (-1,n,8,1) ehci0: <Zynq-7000 EHCI USB 2.0 controller> mem 0x2000-0x2fff on simplebus1 usbus0: EHCI version 1.0 usbus0: stop timeout usbus0 on ehci0 gpio0: <Zynq-7000 GPIO driver> mem 0xa000-0xafff on simplebus1 gpiobus0: <GPIO bus> on gpio0 gpioc0: <GPIO controller> on gpio0 cgem0: <Cadence CGEM Gigabit Ethernet Interface> mem 0xb000-0xbfff on simplebus1 miibus0: <MII bus> on cgem0 e1000phy0: <Marvell 88E1116R Gigabit PHY> PHY 0 on miibus0 e1000phy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto cgem0: Ethernet address: 04:4f:8b:00:10:05 sdhci_fdt0: <Zynq-7000 generic fdt SDHCI controller> mem 0x101000-0x101fff on simplebus1 sdhci_fdt0: 1 slot(s) allocated mmc0: <MMC/SD bus> on sdhci_fdt0 cryptosoft0: <software crypto> Timecounters tick every 10.000 msec usbus0: 480Mbps High Speed USB v2.0 ugen0.1: <Xilinx> at usbus0 uhub0: <Xilinx EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0 mmcsd0: 8GB <SDHC SD8GB 3.0 SN 0024F634 MFG 11/2015 by 65 42> at mmc0 48.0MHz/4bit/65535-block Release APs Trying to mount root from ufs:mmcsd0s2a []... warning: no time-of-day clock registered, system time will not be set accurately uhub0: 1 port with 1 removable, self powered Growing root partition to fill device GEOM_PART: mmcsd0s2 was automatically resized. Use `gpart commit mmcsd0s2` to save changes or `gpart undo mmcsd0s2` to revert them. mmcsd0s2 resized mmcsd0s2a resized super-block backups (for fsck_ffs -b #) at: 1964224, 2455232, 2946240, 3437248, 3928256, 4419264, 4910272, 5401280, 5892288, 6383296, 6874304, 7365312, 7856320, 8347328, 8838336, 9329344, 9820352, 10311360, 10802368, 11293376, 11784384, 12275392, 12766400, 13257408, 13748416, 14239424, 14730432, 15221440 growfs: /: cannot reload filesystem: No such file or directory /etc/rc: WARNING: hostid: unable to figure out a UUID from DMI data, generating a new one Setting hostuuid: 644d349f-dc7d-11e6-bdae-044f8b001005. Setting hostid: 0xc057038c. Starting file system checks: /dev/mmcsd0s2a: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/mmcsd0s2a: clean, 1665713 free (273 frags, 208180 blocks, 0.0% fragmentation) Mounting local filesystems:random: unblocking device. . ELF ldconfig path: /lib /usr/lib /usr/lib/compat Soft Float compatibility ldconfig path: Setting hostname: parallella. Setting up harvesting: [UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED Feeding entropy: . cgem0: link state changed to DOWN Starting Network: lo0 cgem0. lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> cgem0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=80008<VLAN_MTU,LINKSTATE> ether 04:4f:8b:00:10:05 media: Ethernet autoselect (none) status: no carrier nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> Starting devd. add host 127.0.0.1: gateway lo0 fib 0: route already in table add host ::1: gateway lo0 fib 0: route already in table add net fe80::: gateway ::1 add net ff02::: gateway ::1 add net ::ffff:0.0.0.0: gateway ::1 add net ::0.0.0.0: gateway ::1 Generating host.conf. Waiting 30s for the default route interface: cgem0: link state changed to UP ....(cgem0) Creating and/or trimming log files. Setting date via ntp. 21 Jan 16:26:31 ntpdate[444]: step time server 74.104.167.114 offset 381792.268844 sec Clearing /tmp (X related). Updating motd:. Mounting late filesystems:. Generating RSA host key. 2048 SHA256:r4oLJst5nAvwViGtbFkCBLFDMXZgzTDz7Ptl4obrjOU root@parallella (RSA) Generating ECDSA host key. 256 SHA256:sTaLxUY5qYzxo3fxWVO1EFjgH+23pxtrKy3gPuc7i14 root@parallella (ECDSA) Generating ED25519 host key. 256 SHA256:Uy0OuwyJr+3klwB75q4Z6vdYRLXXRTcB/c9gmwh7hKs root@parallella (ED25519) Performing sanity check on sshd configuration. Starting sshd. Starting background file system checks in 60 seconds. mount: /dev/mmcsd0s2a: Device busy Sat Jan 21 16:27:13 UTC 2017 FreeBSD/arm (parallella) (ttyu0) login:
It does indeed boot. NIce. After changing password on the freebsd user I can login via ssh too
tingo@kg-core1$ ssg freebsd@10.1.161.32 Warning: Permanently added '10.1.161.32' (ECDSA) to the list of known hosts. Password for freebsd@parallella: FreeBSD 11.0-RELEASE-p5 (PARALLELLA) #0 r309692: Sun Jan 15 18:07:24 PST 2017 Welcome to FreeBSD!
good.
2016-01-21: I'm going to test a new image (FreeBSD-armv6-11.0-PARALLELLA-309692.img.bz2) created by Thomas Skibo. Again, I'm using my workstation (c1) to write the image to a 8 GB Kingston microSD card.
tingo@kg-core1$ uname -a FreeBSD kg-core1.kg4.no 10.3-STABLE FreeBSD 10.3-STABLE #0 r310083: Wed Dec 14 21:00:13 CET 2016 root@kg-core1.kg4.no:/usr/obj/usr/src/sys/GENERIC amd64
I am using a usb card reader like DX SKU 371029), I put the microSD card in the reader and insert the reader into my usb hub. The combination looks like this in /var/log/messages
Jan 21 17:09:36 kg-core1 kernel: ugen3.6: <Generic> at usbus3 Jan 21 17:09:36 kg-core1 kernel: umass1: <Generic Mass Storage Device, class 0/0, rev 2.00/3.00, addr 6> on usbus3 Jan 21 17:09:36 kg-core1 kernel: umass1: SCSI over Bulk-Only; quirks = 0xc100 Jan 21 17:09:36 kg-core1 kernel: umass1:8:1:-1: Attached to scbus8 Jan 21 17:09:36 kg-core1 kernel: da1 at umass-sim1 bus 1 scbus8 target 0 lun 0 Jan 21 17:09:36 kg-core1 kernel: da1: <Mass Storage Device \001\000\000?> Removable Direct Access SCSI device Jan 21 17:09:36 kg-core1 kernel: da1: Serial Number 125C20100726 Jan 21 17:09:36 kg-core1 kernel: da1: 40.000MB/s transfers Jan 21 17:09:36 kg-core1 kernel: da1: 7600MB (15564800 512 byte sectors) Jan 21 17:09:36 kg-core1 kernel: da1: quirks=0x2<NO_6_BYTE>
the image is this
tingo@kg-core1$ ll -h *P*img -rw-r--r-- 1 tingo users - 1.0G Jan 17 08:03 FreeBSD-armv6-11.0-PARALLELLA-309692.img
write it
tingo@kg-core1$ sudo dd if=./FreeBSD-armv6-11.0-PARALLELLA-309692.img of=/dev/da1 bs=8M 128+0 records in 128+0 records out 1073741824 bytes transferred in 102.656653 secs (10459544 bytes/sec)
disktype check
tingo@kg-core1$ sudo disktype /dev/da1 --- /dev/da1 Character device, size 7.422 GiB (7969177600 bytes) DOS/MBR partition map Partition 1: 63.98 MiB (67092480 bytes, 131040 sectors from 63, bootable) Type 0x0C (Win95 FAT32 (LBA)) FAT16 file system (hints score 5 of 5) Volume size 63.90 MiB (67006464 bytes, 16359 clusters of 4 KiB) Partition 2: 959 MiB (1005584384 bytes, 1964032 sectors from 132096) Type 0xA5 (FreeBSD) BSD disklabel (at sector 1), 8 partitions Partition a: 958.9 MiB (1005518848 bytes, 1963904 sectors from 0) Type 7 (4.2BSD fast file system) Includes the disklabel and boot code UFS2 file system, 64 KiB offset, little-endian Last mounted at "/usr/home/skibo/crochet-freebsd/work/_.mount.freebsd" Partition c: 959 MiB (1005584384 bytes, 1964032 sectors from 0) Type 0 (Unused)
ok. Now mount and check the boot partition
tingo@kg-core1$ sudo mount -t msdosfs /dev/da1s1 /media tingo@kg-core1$ ls -l /media total 7988 -rwxrwxr-x 1 root wheel 4430 Jan 17 06:18 devicetree.dtb -rwxrwxr-x 1 root wheel 8170816 Jan 17 06:22 uImage
it is missing the FPGA bitstream. Test if the image will boot without it.
tingo@kg-core1$ sudo umount /media
ok.
2016-01-16: log from the first boot with a serial console attached:
tingo@kg-core1$ cu -l /dev/cuaU0 -s 115200 can't open log file /var/log/aculog. Connected U-Boot 2012.10-00003-g792c31c (Jan 03 2014 - 12:24:08) I2C: ready DRAM: 992 MiB WARNING: Caches not enabled MMC: SDHCI: 0 SF: Detected N25Q128 with page size 64 KiB, total 16 MiB In: serial Out: serial Err: serial Net: zynq_gem Hit any key to stop autoboot: 0 Configuring PL and Booting Linux... Device: SDHCI Manufacturer ID: 3 OEM: 5344 Name: SL08G Tran Speed: 50000000 Rd Block Len: 512 SD version 2.0 High Capacity: Yes Capacity: 7.4 GiB Bus Width: 4-bit reading parallella.bit.bin 4045568 bytes read reading uImage 8170816 bytes read reading devicetree.dtb 3406 bytes read ## Booting kernel from Legacy Image at 03000000 ... Image Name: parallella-freebsd Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 8170752 Bytes = 7.8 MiB Load Address: 00100000 Entry Point: 00100100 Verifying Checksum ... OK ## Flattened Device Tree blob at 02a00000 Booting using the fdt blob at 0x02a00000 Loading Kernel Image ... OK OK Loading Device Tree to 1fffc000, end 1ffffd4d ... OK Starting kernel ... Copyright (c) 1992-2016 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 11.0-RELEASE-p1 #0 r306420M: Thu Jan 5 19:29:24 PST 2017 skibo@ashbury:/usr/obj/arm.armv6/usr/src/sys/PARALLELLA arm FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) CPU: Cortex A9-r3 rev 0 (Cortex-A core) Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext WB enabled LABT branch prediction disabled LoUU:2 LoC:2 LoUIS:2 Cache level 1: 32KB/32B 4-way data cache WB Read-Alloc Write-Alloc 32KB/32B 4-way instruction cache Read-Alloc real memory = 1040183296 (991 MB) avail memory = 1008218112 (961 MB) FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs random: entropy device external interface ofwbus0: <Open Firmware Device Tree> simplebus0: <Flattened device tree simple bus> on ofwbus0 simplebus1: <Flattened device tree simple bus> on ofwbus0 l2cache0: <PL310 L2 cache controller> mem 0xf02000-0xf02fff on simplebus0 l2cache0: cannot allocate IRQ, not using interrupt l2cache0: Part number: 0x3, release: 0x8 l2cache0: L2 Cache enabled: 512KB/32B 8 ways gic0: <ARM Generic Interrupt Controller> mem 0xf01000-0xf01fff,0xf00100-0xf001ff on simplebus0 gic0: pn 0x390, arch 0x1, rev 0x2, implementer 0x43b irqs 96 mp_tmr0: <ARM MPCore Timers> mem 0xf00200-0xf002ff,0xf00600-0xf0061f on simplebus0 Timecounter "MPCore" frequency 333333333 Hz quality 800 Event timer "MPCore" frequency 333333333 Hz quality 1000 zy7_slcr0: <Zynq-7000 slcr block> mem 0-0xfff on simplebus0 zy7_devcfg0: <Zynq devcfg block> mem 0x7000-0x7fff on simplebus0 uart0: <Cadence UART> mem 0x1000-0x1fff on simplebus1 uart0: console (-1,n,8,1) ehci0: <Zynq-7000 EHCI USB 2.0 controller> mem 0x2000-0x2fff on simplebus1 usbus0: EHCI version 1.0 usbus0: stop timeout usbus0 on ehci0 gpio0: <Zynq-7000 GPIO driver> mem 0xa000-0xafff on simplebus1 gpiobus0: <GPIO bus> on gpio0 gpioc0: <GPIO controller> on gpio0 cgem0: <Cadence CGEM Gigabit Ethernet Interface> mem 0xb000-0xbfff on simplebus1 miibus0: <MII bus> on cgem0 e1000phy0: <Marvell 88E1116R Gigabit PHY> PHY 0 on miibus0 e1000phy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto cgem0: Ethernet address: 04:4f:8b:00:10:05 sdhci_fdt0: <Zynq-7000 generic fdt SDHCI controller> mem 0x101000-0x101fff on simplebus1 sdhci_fdt0: 1 slot(s) allocated mmc0: <MMC/SD bus> on sdhci_fdt0 cryptosoft0: <software crypto> Timecounters tick every 10.000 msec usbus0: 480Mbps High Speed USB v2.0 ugen0.1: <Xilinx> at usbus0 uhub0: <Xilinx EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0 mmcsd0: 8GB <SDHC SL08G 8.0 SN 615E8841 MFG 08/2014 by 3 SD> at mmc0 48.0MHz/4bit/65535-block Release APs Trying to mount root from ufs:mmcsd0s2a []... WARNING: / was not properly dismounted warning: no time-of-day clock registered, system time will not be set accurately Setting hostuuid: 2ef1244b-da90-11e6-a7d4-044f8b001005. Setting hostid: 0x2c8e02b5. uhub0: 1 port with 1 removable, self powered Starting file system checks: ** SU+J Recovering /dev/mmcsd0s2a ** Reading 4194304 byte journal from inode 4. ** Building recovery table. ** Resolving unreferenced inode list. ** Processing journal entries. ** 1 journal records in 512 bytes for 6.25% utilization ** Freed 0 inodes (0 dirs) 0 blocks, and 0 frags. ***** FILE SYSTEM MARKED CLEAN ***** Mounting local filesystems:random: unblocking device. . ELF ldconfig path: /lib /usr/lib /usr/lib/compat Soft Float compatibility ldconfig path: Setting hostname: zedboard. Setting up harvesting: [UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED Feeding entropy: . cgem0: link state changed to DOWN Starting Network: lo0 cgem0. lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> cgem0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=80008<VLAN_MTU,LINKSTATE> ether 04:4f:8b:00:10:05 media: Ethernet autoselect (none) status: no carrier nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> Starting devd. add host 127.0.0.1: gateway lo0 fib 0: route already in table add host ::1: gateway lo0 fib 0: route already in table add net fe80::: gateway ::1 add net ff02::: gateway ::1 add net ::ffff:0.0.0.0: gateway ::1 add net ::0.0.0.0: gateway ::1 Waiting 30s for the default route interface: cgem0: link state changed to UP .(cgem0) Creating and/or trimming log files. Setting date via ntp. 16 Jan 15:33:04 ntpdate[420]: step time server 198.60.22.240 offset 154875.549455 sec Clearing /tmp (X related). Updating motd:. Mounting late filesystems:. Performing sanity check on sshd configuration. Starting sshd. Starting background file system checks in 60 seconds. Mon Jan 16 15:33:06 UTC 2017 FreeBSD/arm (zedboard) (ttyu0) login: root FreeBSD 11.0-RELEASE-p1 (PARALLELLA) #0 r306420M: Thu Jan 5 19:29:24 PST 2017 Welcome to FreeBSD! Release Notes, Errata: https://www.FreeBSD.org/releases/ Security Advisories: https://www.FreeBSD.org/security/ FreeBSD Handbook: https://www.FreeBSD.org/handbook/ FreeBSD FAQ: https://www.FreeBSD.org/faq/ Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ FreeBSD Forums: https://forums.FreeBSD.org/ Documents installed with the system are in the /usr/local/share/doc/freebsd/ directory, or can be installed later with: pkg install en-freebsd-doc For other languages, replace "en" with a language code like de or fr. Show the version of FreeBSD installed: freebsd-version ; uname -a Please include that output and any error messages when posting questions. Introduction to manual pages: man man FreeBSD directory layout: man hier Edit /etc/motd to change this login announcement. root@zedboard:~ #
ok.