I'd like to play with my Synology Diskstation DS213j and install Arch Linux Arm. Unfortunately the Marvell Armada 370 88F6707 CPU is one of the few armv7-a CPUs which is lacking support for neon fpu instructions. Hence the current armv7h build with neon enabled wouldn't boot.
[code]
/proc/cpuinfo
Processor : Marvell PJ4Bv7 Processor rev 1 (v7l)
BogoMIPS : 1196.85
Features : swp half thumb fastmult vfp edsp vfpv3 vfpv3d16 tls
CPU implementer : 0x56
CPU architecture: 7
CPU variant : 0x1
CPU part : 0x581
CPU revision : 1
Hardware : Marvell Armada-370
Revision : 0000
Serial : 0000000000000000
[/code]
I was able to debootstrap a armhf Debian rootfs and boot a Debian kernel, but this is only half the fun as I am very much hooked to Arch Linux. My question is, how difficult would it be to compile an armv7h Arch rootfs without neon support?
I got the cross toolchain compiled with crosstool-ng and a little hello world test on the original Synology DSM was successful. I also have the linux-armv7 kernel cross compiled with my custom makepkg.conf
[code]
# makepkg-arm.conf
# make sure this is in the same dir as makepkg-arm or adjust makepkg-arm
#
source /etc/makepkg.conf
CARCH="armv7h"
CHOST="arm-unknown-linux-gnueabihf"
export PATH='/home/alex/x-tools/arm-unknown-linux-gnueabihf/bin':${PATH}
export ARCH='arm'
export CROSS_COMPILE='arm-unknown-linux-gnueabihf-'
#-- Compiler and Linker Flags
# -march (or -mcpu) builds exclusively for an architecture
# -mtune optimizes for an architecture, but builds for whole processor family
CPPFLAGS=""
CFLAGS="-march=armv7-a+mp+sec -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
-fstack-clash-protection"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
LTOFLAGS=""
[/code]
Combine kernel with the synology device tree and make it bootable by u-boot:
[code]
cat zImage dtbs/armada-370-synology-ds213j.dtb > zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n linux-armv7-6.2.10-1 -d zImage.fdt uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x08000000 -e 0x08000000 -n initramfs-6.2.10-1 -d initramfs-linux.img uInitrd
[/code]
From the uboot prompt TFTP boot the kernel:
[code]
setenv initrd_addr 0x03000000
setenv serverip 192.168.6.77
setenv bootargs "${console} root=PARTUUID=e0453fa9-02 rw rootwait earlycon"
dhcp
tftp ${loadaddr} ${serverip}:${image_name}
tftp ${initrd_addr} ${serverip}:${initrd_name}
bootm ${loadaddr} ${initrd_addr}
[/code]
The kernel boots but panics when executing [code]init[/code] as the current arch rootfs is compiled with neon enabled. How difficult would it be to compile at least the rootfs with a basic set of packages without neon?
References:
[url]https://archlinuxarm.org/forum/viewtopic.php?f=3&t=15721[/url]
[url]https://archlinuxarm.org/forum/viewtopic.php?t=6163[/url]
[url]https://archlinuxarm.org/forum/viewtopic.php?f=28&t=1218[/url]