view sources/targets/sh4 @ 1725:c0c2e67782be draft

New squashfs config symbol, not sure why you'd ever want to switch it off...
author Rob Landley <rob@landley.net>
date Sun, 25 Jan 2015 11:48:36 -0600
parents e29e0ca60d74
children b89324905ca2
line wrap: on
line source

DESCRIPTION="
Hitachi developed the 4th iteration of the SuperH processor for the Dreamcast game console in 1998.
The design remains popular in Japan (especially the automotive industry), and is these days owned
by Renesas, a joint venture between Hitachi, NEC, and Mitsubishi.

There's a wiki about it at http://linux-sh.org.
"

KARCH=sh
KERNEL_PATH=arch/${KARCH}/boot/zImage
GCC_FLAGS= #"--with-cpu=m4-nofpu"
BINUTILS_FLAGS=
QEMU_TEST=$KARCH
CROSS_TARGET=sh-superh-linux

ROOT=sda
CONSOLE="ttySC1 noiotrap"

UCLIBC_CONFIG="
TARGET_sh=y
ARCH_WANTS_LITTLE_ENDIAN=y
UCLIBC_HAS_FPU=y
"

# This needs some massive cleanup, but part of the problem is arch/sh4/Kconfig forces on EXPERT
# which requies re-selecting a bunch of standard features.  Apparently sh is not meant to be
# used by normal people, it's "special".

LINUX_CONFIG="
CONFIG_CPU_SUBTYPE_SH7751R=y
CONFIG_MMU=y
CONFIG_MEMORY_START=0x0c000000
CONFIG_VSYSCALL=y
CONFIG_FLATMEM_MANUAL=y
CONFIG_SH_FPU=y
CONFIG_SH_RTS7751R2D=y
CONFIG_RTS7751R2D_PLUS=y
CONFIG_SH_TIMER_TMU=y
CONFIG_HW_PERF_EVENTS=y
CONFIG_ATA=y
CONFIG_SATA_PMP=y
CONFIG_ATA_SFF=y
CONFIG_ATA_BMDMA=y
CONFIG_PATA_PLATFORM=y
CONFIG_SERIO_SERPORT=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_SH_SCI=y
CONFIG_SERIAL_SH_SCI_CONSOLE=y
CONFIG_SPI=y
CONFIG_SPI_SH_SCI=y
CONFIG_MFD_SM501=y
CONFIG_RTC_DRV_R9701=y
"

emulator_command()
{
  echo qemu-system-sh4 -M r2d $(qemu_defaults "$@") -monitor null -serial null -serial stdio
}

# qemu-system-sh4 -m 512 -nographic -monitor null -serial null -serial stdio -append 'earlyprintk=sh-sci.1 root=/dev/sda rw init=/bin/ash'