Just for the heck of it, I decided to try loading Linux on this board. It turned out to be harder than I expected, as u-boot's compilation fails when the system is configured without network support (as the board doesn't contain any network hardware). The workaround is to force network support on in u-boot even if it's disabled in a kernel.
Anyways, I got Linux to boot successfully. I've connected external UART-USB module as this way I can use terminal like putty, as opposed to jtagterminal function of xsdb as the latter is more limited. The full bootlog is here for those curious:
U-Boot 2020.01 (Dec 05 2020 — 14:15:39 +0000)
Model: Xilinx MicroBlaze
DRAM: 256 MiB
WDT: Not found!
Loading Environment from SPI Flash... Invalid bus 0 (err=-19)
*** Warning — spi_flash_probe_bus_cs() failed, using default environment
In: serial
Out: serial
Err: serial
Model: Xilinx MicroBlaze
Net: Net Initialization Skipped
No ethernet found.
U-BOOT for sp50
Hit any key to stop autoboot: 0
U-Boot>?
? — alias for 'help'
askenv — get environment variables from stdin
base — print or set address offset
bdinfo — print Board Info structure
boot — boot default, i.e., run 'bootcmd'
bootd — boot default, i.e., run 'bootcmd'
bootelf — Boot from an ELF image in memory
bootm — boot application image from memory
bootp — boot image via network using BOOTP/TFTP protocol
bootvx — Boot vxWorks from an ELF image
cmp — memory compare
coninfo — print console devices and information
cp — memory copy
crc32 — checksum calculation
dhcp — boot image via network using DHCP/TFTP protocol
dm — Driver model low level access
echo — echo args to console
editenv — edit environment variable
env — environment handling commands
exit — exit script
ext2load — load binary file from a Ext2 filesystem
ext2ls — list files in a directory (default /)
ext4load — load binary file from a Ext4 filesystem
ext4ls — list files in a directory (default /)
ext4size — determine a file's size
false — do nothing, unsuccessfully
fatinfo — print information about filesystem
fatload — load binary file from a dos filesystem
fatls — list files in a directory (default /)
fatsize — determine a file's size
fdt — flattened device tree utility commands
fsinfo — print information about filesystems
fsload — load binary file from a filesystem image
fsls — list files in a directory (default /)
fstype — Look up a filesystem type
go — start application at address 'addr'
gpio — query and control gpio pins
help — print command description/usage
iminfo — print header information for application image
imxtract — extract a part of a multi-image
interrupts- enable or disable interrupts
irqinfo — print information about IRQs
itest — return true/false on integer compare
led — manage LEDs
ln — Create a symbolic link
load — load binary file from a filesystem
loadb — load binary file over serial line (kermit mode)
loads — load S-Record file over serial line
loadx — load binary file over serial line (xmodem mode)
loady — load binary file over serial line (ymodem mode)
loop — infinite loop on address range
ls — list files in a directory (default /)
md — memory display
mii — MII utility commands
mm — memory modify (auto-incrementing address)
mw — memory write (fill)
nfs — boot image via network using NFS protocol
nm — memory modify (constant address)
part — disk partition related commands
ping — send ICMP ECHO_REQUEST to network host
printenv — print environment variables
pxe — commands to get and boot from pxe files
reset — Perform RESET of the CPU
run — run commands in an environment variable
save — save file to a filesystem
saveenv — save environment variables to persistent storage
saves — save S-Record file over serial line
setenv — set environment variables
sf — SPI flash sub-system
showvar — print local hushshell variables
size — determine a file's size
sleep — delay execution for some time
source — run script from memory
sspi — SPI utility command
sysboot — command to get and boot from syslinux files
test — minimal test like /bin/sh
tftpboot — boot image via network using TFTP protocol
true — do nothing, successfully
version — print monitor, compiler and linker version
U-Boot>version
U-Boot 2020.01 (Dec 05 2020 — 14:15:39 +0000)
microblazeel-xilinx-linux-gcc (GCC) 9.2.0
GNU ld (GNU Binutils) 2.32.0.20190204
U-Boot>boot
## Booting kernel from Legacy Image at 80000000 ...
Image Name: Linux-5.4.0-xilinx-v2020.2
Image Type: MicroBlaze Linux Kernel Image (uncompressed)
Data Size: 9085444 Bytes = 8.7 MiB
Load Address: 80000000
Entry Point: 80000000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 82e00000 ...
Image Name: petalinux-image-minimal-microbla
Image Type: MicroBlaze Linux RAMDisk Image (uncompressed)
Data Size: 6930085 Bytes = 6.6 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 81e00000
Booting using the fdt blob at 0x81e00000
Loading Kernel Image
Loading Ramdisk to 8e964000, end 8efffea5 ... OK
Loading Device Tree to 8e95d000, end 8e963193 ... OK
Starting kernel ...
Ramdisk addr 0x8e964000,
FDT at 0x8e95d000
earlycon: uartlite_a0 at MMIO 0x40600000 (options '115200n8')
printk: bootconsole [uartlite_a0] enabled
cma: Reserved 16 MiB at 0x8d800000
Linux version 5.4.0-xilinx-v2020.2 (oe-user@oe-host) (gcc version 9.2.0 (GCC)) #1 PREEMPT Fri Dec 4 04:46:15 UTC 2020
setup_memory: max_mapnr: 0x10000
setup_memory: min_low_pfn: 0x80000
setup_memory: max_low_pfn: 0x90000
setup_memory: max_pfn: 0x90000
Zone ranges:
DMA [mem 0x0000000080000000-0x000000008fffffff]
Normal empty
HighMem empty
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000080000000-0x000000008fffffff]
Initmem setup node 0 [mem 0x0000000080000000-0x000000008fffffff]
setup_cpuinfo: initialising cpu 0
setup_cpuinfo: Using full CPU PVR support
wt_msr_noirq
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists, mobility grouping on. Total pages: 64960
Kernel command line: console=ttyUL0,115200 earlycon root=/dev/ram0 rw
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 228324K/262144K available (5400K kernel code, 177K rwdata, 1456K rodata,
167K init, 564K bss, 17436K reserved, 16384K cma-reserved, 0K highmem)
Kernel virtual memory layout:
* 0xfffea000..0xfffff000 : fixmap
* 0xff800000..0xffc00000 : highmem PTEs
* 0xff7ff000..0xff800000 : early ioremap
* 0xf0000000..0xff7ff000 : vmalloc & ioremap
rcu: Preemptible hierarchical RCU implementation.
Tasks RCU enabled.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
irq-xilinx: /amba_pl/interrupt-controller@41200000: num_irq=4, sw_irq=0, edge=0x9
xilinx_timer_init: Timer base: 0xf0020000, Clocksource base: 0xf0020010
clocksource: xilinx_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
sched_clock: 32 bits at 100MHz, resolution 10ns, wraps every 21474836475ns
/amba_pl/timer@41c00000: irq=1, cpu_id 0
xilinx_timer_shutdown
xilinx_timer_set_periodic
Calibrating delay loop... 48.74 BogoMIPS (lpj=243712)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
rcu: Hierarchical SRCU implementation.
devtmpfs: initialized
random: get_random_u32 called from bucket_table_alloc.isra.0+0x70/0x218 with crng_init=0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 16 (order: -4, 448 bytes, linear)
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic allocations
audit: initializing netlink subsys (disabled)
audit: type=2000 audit(0.350:1): state=initialized audit_enabled=0 res=1
clocksource: Switched to clocksource xilinx_clocksource
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 6144 bytes, linear)
TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
TCP bind hash table entries: 2048 (order: 3, 40960 bytes, linear)
TCP: Hash tables configured (established 2048 bind 2048)
UDP hash table entries: 128 (order: 0, 6144 bytes, linear)
UDP-Lite hash table entries: 128 (order: 0, 6144 bytes, linear)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
random: fast init done
Freeing initrd memory: 6764K
workingset: timestamp_bits=14 max_order=16 bucket_order=2
Key type cifs.idmap registered
romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
io scheduler mq-deadline registered
io scheduler kyber registered
XGpio: gpio@40000000: registered, base is 510
XGpio: gpio@40000000: dual channel registered, base is 504
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
40600000.serial: ttyUL0 at MMIO 0x40600000 (irq = 4, base_baud = 0) is a uartlite
printk: console [ttyUL0] enabled
printk: console [ttyUL0] enabled
printk: bootconsole [uartlite_a0] disabled
printk: bootconsole [uartlite_a0] disabled
brd: module loaded
loop: module loaded
spi-nor spi0.0: s25fl128l (16384 Kbytes)
4 fixed-partitions partitions found on MTD device spi0.0
Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x000000220000 : "fpga"
0x000000220000-0x0000002a0000 : "boot"
0x0000002a0000-0x0000003a0000 : "bootenv"
0x0000003a0000-0x0000009a0000 : "kernel"
libphy: Fixed MDIO Bus: probed
NET: Registered protocol family 17
Key type encrypted registered
Freeing unused kernel memory: 164K
This architecture does not have kernel memory protection.
Run /init as init process
INIT: version 2.88 booting
mount: mounting proc on /proc failed: Device or resource busy
mount: mounting sysfs on /sys failed: Device or resource busy
/etc/rcS.d/S04mdev: line 10: /proc/sys/kernel/hotplug: No such file or directory
Sat Dec 5 14:17:57 UTC 2020
random: dd: uninitialized urandom read (512 bytes read)
Configuring packages on first boot....
(This may take several minutes. Please do not power off the machine.)
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
Removing any system startup links for run-postinsts ...
/etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... Cannot find device "eth0"
Starting Dropbear SSH server: random: dropbearkey: uninitialized urandom read (32 bytes read)
Generating 2048 bit rsa key, this may take a while...
random: dropbearkey: uninitialized urandom read (32 bytes read)
random: crng init done
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7Ixdq8q05F/6974vKDs6onvP/35jPb0e3LdkOUDFp
Q64CGJVgww1sJj9MacLYlRNIqmt5dDtoHE5MHjQTJG4yyaIXO072xVGiUz9bPJKwXxy/loVMYDLeJbGH
7cLW85DQh9isR4CDgnRJzYRV0he6FMTKmLRcb+7FLhHOQ8LCDAZqf1St114LXqK54Qzbpy+7k+tTLqK8
QUSXys5ad52WzzYhRArUYO/78NLPXSYsjciULBGnmaqnC2Yfp2ls3M+KiAYvVuzgSr1B6iIgPdIoY0iH
ulkn8qS/Vz2JWFYKZs5CYa35X39ZukreVGc3mjpmzyi6h9Ws6PaXdb2btMG7 root@sp50
Fingerprint: sha1!! fe:ab:fb:e7:42:2d:13:d8:ae:8d:cf:9e:d0:0f:b8:ab:e7:1b:e4:1c
dropbear.
Starting internet superserver: inetd.
Starting syslogd/klogd: done
Starting tcf-agent: OK
PetaLinux 2020.2 sp50 /dev/ttyUL0
sp50 login: root
Password:
root@sp50:~# uname -a
Linux sp50 5.4.0-xilinx-v2020.2 #1 PREEMPT Fri Dec 4 04:46:15 UTC 2020 microblaze GNU/Linux
root@sp50:~# uname -a
Linux sp50 5.4.0-xilinx-v2020.2 #1 PREEMPT Fri Dec 4 04:46:15 UTC 2020 microblaze GNU/Linux
root@sp50:~#
Now I'm thinking it would be cool to design a small addon board with 100 Mbit ethernet PHY and a UART-USB bridge - there should be just enough GPIOs to do that, and 100 Mbit PHY uses MII bus running at 25 MHz, so lack of length-matching should not be a big deal.
Right now I'm booting everything through JTAG as the system as-built does not fit into 128 Mbit QSPI flash device I have installed on a board. I think it's possible to cut away enough fat to make it fit, or alternatively it's possible to replace the flash with 256 Mbit device in the same SOIC-8 package.
Also Xilinx recently added experimental support of SMP into petalinux, would be interesting to see if I can get it to work. I've created a dual-core design, and it fits into S50 device I have on a board along with 128K of L2 cache (implemented using System Cache IP).