A pile of failures and finally a success!
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.19.7 (philpem@panther) (gcc version 4.9.4 (Linaro GCC 4.9-2017.01) ) #1 Sun Dec 28 23:33:40 GMT 2025
It spins on "sending BOOTP requests" but that's because I'm missing the TS7xxx Watchdog driver. But this is success!
Getting there!
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.14.336 (philpem@panther) (gcc version 4.9.4 (Linaro GCC 4.9-2017.01)) #4 Sun Dec 28 23:59:37 GMT 2025
It's not the compiler, Linaro 6.4.1 can make a working 4.14.336 kernel:
Linux version 4.14.336 (philpem@panther) (gcc version 6.4.1 20171012 (Linaro GCC 6.4-2017.11)) #8 Mon Dec 29 01:23:48 GMT 2025
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c000717f
Machine: Technologic Systems TS-72xx SBC
(I had to fix a bug in Technologic's boot sector - it sets the machine ID wrong)
4.17.19 works...
Linux version 4.17.19 (philpem@panther) (gcc version 6.4.1 20171012 (Linaro GCC 6.4-2017.11)) #1 Mon Dec 29 01:47:33 GMT 2025
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c000717f
CPU: VIVT data cache, VIVT instruction cache
Machine: Technologic Systems TS-72xx SBC
Getting closer.
philpem@panther:~/TS7300/os/linux-git$ git bisect good
Bisecting: 209 revisions left to test after this (roughly 8 steps)
[f5b7769eb0400ec5217a47e41148a9f816ca1f9f] Revert "debugfs: inode: debugfs_create_dir uses mode permission from parent"
Commit is sus.
linux-git$ git bisect good
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[050e9baa9dc9fbd9ce2b27f0056990fc9e0a08a0] Kbuild: rename CC_STACKPROTECTOR[_STRONG] config variables
$ git bisect good
050e9baa9dc9fbd9ce2b27f0056990fc9e0a08a0 is the first bad commit
commit 050e9baa9dc9fbd9ce2b27f0056990fc9e0a08a0
Author: Linus Torvalds <[email protected]>
Date: Thu Jun 14 12:21:18 2018 +0900
Kbuild: rename CC_STACKPROTECTOR[_STRONG] config variables
Hmm. So either Linux screwed something up in this commit, or there's a change in config which hasn't been accounted for.
$ grep STACKPRO ../linux-4.14.336-ts7300.config
CONFIG_HAVE_CC_STACKPROTECTOR=y
# CONFIG_CC_STACKPROTECTOR is not set
CONFIG_CC_STACKPROTECTOR_NONE=y
# CONFIG_CC_STACKPROTECTOR_REGULAR is not set
# CONFIG_CC_STACKPROTECTOR_STRONG is not set
And for 4.18.1...
CONFIG_HAVE_STACKPROTECTOR=y
CONFIG_CC_HAS_STACKPROTECTOR_NONE=y
CONFIG_STACKPROTECTOR=y
CONFIG_STACKPROTECTOR_STRONG=y
So the strong stack protector is wot's broke, and needs turning off.
And the offending article is CONFIG_STACKPROTECTOR_STRONG -- turn this off and 4.18.1 boots:
Linux version 4.18.1 (philpem@panther) (gcc version 6.4.1 20171012 (Linaro GCC 6.4-2017.11)) #2 Mon Dec 29 14:50:02 GMT 2025
I happened to notice this gem in /proc/iomem.
00000000-007fffff : System RAM
00008000-00436fff : Kernel code
0045a000-004a1af3 : Kernel data
01000000-017fffff : System RAM
04000000-047fffff : System RAM
05000000-057fffff : System RAM
The RAM is 32 MiB, split into four non-contiguous 8MiB banks.
The compressed kernel gets loaded at 0x218000, roughly 2MB into the first. Initrd ends up at 0x01000000 - in the 2nd bank.
The kernel decompressor relocates if it needs to (in theory).
But what happens if uncompressed kernel + compressed kernel > 8MB?
From the description of the decompression process in the kernel documentation (about how it gets the decompression base address by ANDing the PC with 0xF800_0000 and adding 0x8000) I don't think it's smart enough to parse the ATAGS to find out about memory gaps.
What if I load the kernel at 0x0400_0000?
Linux version 4.19.325 (philpem@panther) (gcc version 6.5.0 (Linaro GCC 6.5-2018.12)) #2 Tue Dec 30 23:22:17 GMT 2025
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c000717f
CPU: VIVT data cache, VIVT instruction cache
Machine: Technologic Systems TS-72xx SBC
Nice.
Almost...
Error: invalid dtb and unrecognized/unsupported machine ID
r1=0x000002a1, r2=0x00000100
r2[]=05 00 00 00 01 00 41 54 00 00 00 00 00 00 00 00
Available machine support:
ID (hex) NAME
ffffffff Generic DT based system
Please check your kernel config and/or bootloader.
Aha! "make cirrus/ep93xx_ts7250.dtb" builds the DTB, and with the right options it can be cat'ed onto the end of the zImage.
DTB:0x04367EF8 (0x000021EE)
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 6.18.2 (philpem@panther) (arm-linux-gnueabi-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #2 Wed Dec 31 03:13:33 GMT 2025
Shame the Ethernet interface isn't working - that's probably PHY related.
