2025年12月時点で最新のLinux-6.18 カーネルのSH7706(SH3)対応差分を公開します。
カーネル差分は linux-6.18-shmin-1.patchです。
Linuxカーネル本体のソースアーカイブは linux-6.18.tar.xzです。
Linuxカーネル本体のソースアーカイブを展開して、差分パッチファイルを配置したあとにフォルダ内に入り、パッチファイルを当ててから、設定を読込・保存してから、カーネル構築をします。
カーネル構築方法は、Linux-5.11.1カーネル差分公開の記事と同じやり方です。
ルートファイルシステムは、最新カーネルに合わせて、最新のBusyBoxを使って構築すべきですが、とりあえず動かすには昔のLInux2.x用のルートファイルシステムでも安定して動作します。
SH7706でのLInux6.18のブート画面は以下のとおりです。
Linux version 6.18.0 (general@B650) (sh-multilib-linux-musl-gcc (crosstool-NG 15
Boot params:
… MOUNT_ROOT_RDONLY – 00000001
… RAMDISK_FLAGS – 0000c000
… ORIG_ROOT_DEV – 00000200
… LOADER_TYPE – 00000001
… INITRD_START – 0105c000
… INITRD_SIZE – 0002e0dc
Memory limited to 32MB
Booting machvec: SHMIN
Zone ranges:
Normal [mem 0x000000000c000000-0x000000000dffffff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x000000000c000000-0x000000000dffffff]
Initmem setup node 0 [mem 0x000000000c000000-0x000000000dffffff]
SHMIN Setup…
This is SH7706LAN board Ver 2.0
done.
Kernel command line: mem=32M console=ttySC1,115200 noinitrd root=/dev/shmmc2
printk: log buffer data + meta data: 16384 + 51200 = 67584 bytes
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
Sorting __ex_table…
Built 1 zonelists, mobility grouping on. Total pages: 8192
mem auto-init: stack:all(zero), heap alloc:off, heap free:off
I-cache : n_ways=4 n_sets=256 way_incr=4096
I-cache : entry_mask=0x00000ff0 alias_mask=0x00000000 n_aliases=0
D-cache : n_ways=4 n_sets=256 way_incr=4096
D-cache : entry_mask=0x00000ff0 alias_mask=0x00000000 n_aliases=0
virtual kernel memory layout:
fixmap : 0xdfff7000 – 0xdffff000 ( 32 kB)
vmalloc : 0xc0000000 – 0xdfff5000 ( 511 MB)
lowmem : 0x8c000000 – 0x8e000000 ( 32 MB) (cached)
: 0xa0000000 – 0xc0000000 ( 512 MB) (uncached)
.init : 0x8c4c9000 – 0x8c4ec000 ( 140 kB)
.data : 0x8c3802bc – 0x8c4c8e50 (1314 kB)
.text : 0x8c001000 – 0x8c3802bc (3580 kB)
SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
rcu: Preemptible hierarchical RCU implementation.
Trampoline variant of Tasks RCU enabled.
rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.
RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_id.
NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
intc: Registered controller ‘sh770x’ with 23 IRQs
intc: Registered controller ‘sh3-irq45’ with 2 IRQs
intc: Registered controller ‘sh3-irq0123’ with 4 IRQs
rcu: srcu_init: Setting srcu_struct sizes based on contention.
Console: colour dummy device 80×25
sh-tmu-sh3.0: ch0: used for clock events
sh-tmu-sh3.0: ch0: used for periodic clock events
sh-tmu-sh3.0: ch1: used as clock source
clocksource: sh-tmu-sh3.0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_nss
sched_clock: 32 bits at 1000 Hz, resolution 1000000ns, wraps every 214748364750s
Calibrating delay loop (skipped)… 120.00 BogoMIPS PRESET (lpj=60000)
CPU: SH7706
pid_max: default: 32768 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.
rcu: Max phase no-delay instances is 400.
Memory: 26632K/32768K available (3576K kernel code, 235K rwdata, 1076K rodata, )
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 191s
posixtimers hash table entries: 512 (order: 0, 2048 bytes, linear)
futex hash table entries: 256 (4096 bytes on 1 NUMA nodes, total 4 KiB, linear).
NET: Registered PF_NETLINK/PF_ROUTE protocol family
DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
SCSI subsystem initialized
sh_tmu sh-tmu-sh3.0: kept as earlytimer
clocksource: Switched to clocksource sh-tmu-sh3.0
sh_tmu sh-tmu-sh3.0: ch0: used for oneshot clock events
NET: Registered PF_INET protocol family
IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered PF_UNIX/PF_LOCAL protocol family
Trying to unpack rootfs image as initramfs…
workingset: timestamp_bits=30 max_order=13 bucket_order=0
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 184K
io scheduler mq-deadline registered
io scheduler kyber registered
random: crng init done
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xb0020000 (irq = 51, base_baud = 1562500) is a TI10
serial8250.0: ttyS1 at MMIO 0xb0040000 (irq = 51, base_baud = 1562500) is a TI10
SuperH (H)SCI(F) driver initialized
sh-sci.0: ttySC0 at MMIO 0xfffffe80 (irq = 39, base_baud = 0) is a sci
sh-sci.1: ttySC1 at MMIO 0xa4000150 (irq = 72, base_baud = 0) is a scif
printk: legacy console [ttySC1] enabled
brd: module loaded
loop: module loaded
ASIX AX88796B Ethernet Adapter:v2.1.0
6 http://www.asix.com.tw
AX88796B: mac address 00:18:5f:00:60:a8
AX88796B: found at 0xb0000000, using IRQ 50.
sh-rtc sh-rtc: registered as rtc0
sh-rtc sh-rtc: setting system clock to 2008-12-31T15:01:32 UTC (1230735692)
ipip: IPv4 and MPLS over IPv4 tunneling driver
Initializing XFRM netlink socket
NET: Registered PF_PACKET protocol family
rc 254
shmmc: MMC Reset OK.
shmmc: SDHC Card
Media size is 15523840
shmmc: shmmc1 shmmc2
check access for rdinit=/init failed: -2, ignoring
EXT4-fs (shmmc2): mounted filesystem 4a6e243d-8a7b-459e-a15a-80e25a9f49cb ro wi.
VFS: Mounted root (ext4 filesystem) readonly on device 254:2.
devtmpfs: mounted
Freeing unused kernel image (initmem) memory: 140K
This architecture does not have kernel memory protection.
Run /sbin/init as init process
EXT4-fs (shmmc2): re-mounted 4a6e243d-8a7b-459e-a15a-80e25a9f49cb r/w.
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
2048 inodes, 8192 blocks
409 blocks (5%) reserved for the super user
First data block=1
Maximum filesystem blocks=262144
1 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
2048 inodes, 8192 blocks
409 blocks (5%) reserved for the super user
First data block=1
Maximum filesystem blocks=262144
1 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
EXT4-fs (ram1): mounted filesystem d91f9614-0312-4a6e-a90b-3ffd6a1c7e68 r/w wit.
ext4 filesystem being mounted at /tmp supports timestamps until 2038-01-19 (0x7)
EXT4-fs (ram2): mounted filesystem d19d2c58-84bb-4dc7-bf85-e5335788f629 r/w wit.
ext4 filesystem being mounted at /mnt supports timestamps until 2038-01-19 (0x7)
EXT4-fs (ram2): unmounting filesystem d19d2c58-84bb-4dc7-bf85-e5335788f629.
EXT4-fs (ram2): mounted filesystem d19d2c58-84bb-4dc7-bf85-e5335788f629 r/w wit.
ext4 filesystem being mounted at /dev supports timestamps until 2038-01-19 (0x7)
FAT-fs (shmmc1): Volume was not properly unmounted. Some data may be corrupt. P.
shlinux login:

