view sources/targets/sh4 @ 1728:b89324905ca2 draft

Giant redo to put simple-root-filesystem in initmpfs. NO_NATIVE_COMPILER and NO_ROOTDIRS went away, kernel built moved back into system-image.sh, old root-filesystem.sh and root-image.sh are no longer used, I need to fix up several things (chroot-splice.sh, the lfs-bootstrap build is breaking in mpfr, haven't tested this on all targets yet... but the basics are in.
author Rob Landley <rob@landley.net>
date Fri, 06 Feb 2015 01:51:54 -0600
parents e29e0ca60d74
children 1d233a893085
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

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'