Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm/conf Reorganize Exynos code step 1 of N



details:   https://anonhg.NetBSD.org/src/rev/4a3fe2e30312
branches:  trunk
changeset: 812236:4a3fe2e30312
user:      marty <marty%NetBSD.org@localhost>
date:      Sun Dec 06 00:31:24 2015 +0000

description:
Reorganize Exynos code step 1 of N

create config files that use evbarm/exynos rather than evbarm/odroid for
the machdep portion.

point ODROID-XU4 at those files

add evbarm/exynos/exyos_{start.S, machdep.c} and platform.h that are exynos
5422 specific.  -- We'll edit in other exynos platforms once this one
fully works.

This boots the Odroid XU4 to the same point as using evbarm/odroid does, but
with some differences in gpio handling.  Everything else should be semantically
equivalent.

diffstat:

 sys/arch/evbarm/conf/ODROID-XU4   |  31 ++++++++++++++++---------------
 sys/arch/evbarm/conf/files.exynos |  12 ++++++++++++
 sys/arch/evbarm/conf/mk.exynos    |  38 ++++++++++++++++++++++++++++++++++++++
 sys/arch/evbarm/conf/std.exynos   |  35 +++++++++++++++++++++++++++++++++++
 4 files changed, 101 insertions(+), 15 deletions(-)

diffs (178 lines):

diff -r 41deacb0cdb6 -r 4a3fe2e30312 sys/arch/evbarm/conf/ODROID-XU4
--- a/sys/arch/evbarm/conf/ODROID-XU4   Sat Dec 05 18:53:29 2015 +0000
+++ b/sys/arch/evbarm/conf/ODROID-XU4   Sun Dec 06 00:31:24 2015 +0000
@@ -1,10 +1,10 @@
 #
-#      $NetBSD: ODROID-XU4,v 1.2 2015/12/05 13:32:49 jmcneill Exp $
+#      $NetBSD: ODROID-XU4,v 1.3 2015/12/06 00:31:24 marty Exp $
 #
 #      ODROID-XU -- ODROID-XU4 Exynos5422 based kernel
 #
 
-include        "arch/evbarm/conf/std.odroid"
+include        "arch/evbarm/conf/std.exynos"
 
 no makeoptions CPUFLAGS
 makeoptions    CPUFLAGS="-mcpu=cortex-a7 -mfpu=neon"
@@ -69,7 +69,7 @@
 #options       QUOTA           # legacy UFS quotas
 #options       QUOTA2          # new, in-filesystem UFS quotas
 #options       FFS_EI          # FFS Endian Independent support
-#options       NFSSERVER
+options        NFSSERVER
 options        WAPBL           # File system journaling support
 #options       FFS_NO_SNAPSHOT # No FFS snapshot support
 
@@ -88,16 +88,16 @@
 #options       PPP_FILTER      # Active filter support for PPP (requires bpf)
 #options       TCP_DEBUG       # Record last TCP_NDEBUG packets with SO_DEBUG
 
-options        NFS_BOOT_BOOTP
-options        NFS_BOOT_DHCP
+#options       NFS_BOOT_BOOTP
+#options       NFS_BOOT_DHCP
 #options               NFS_BOOT_BOOTSTATIC
-#options               NFS_BOOTSTATIC_MYIP="\"192.168.1.4\""
-#options               NFS_BOOTSTATIC_GWIP="\"192.168.1.1\""
+#options               NFS_BOOTSTATIC_MYIP="\"192.168.0.22\""
+#options               NFS_BOOTSTATIC_GWIP="\"192.168.0.1\""
 #options               NFS_BOOTSTATIC_MASK="\"255.255.255.0\""
-#options               NFS_BOOTSTATIC_SERVADDR="\"192.168.1.1\""
-#options               NFS_BOOTSTATIC_SERVER="\"192.168.1.1:/nfs/sdp2430\""
+#options               NFS_BOOTSTATIC_SERVADDR="\"192.168.0.5\""
+#options               NFS_BOOTSTATIC_SERVER="\"192.168.0.5:/stuff/nfs/odroid\""
 
-options                NFS_BOOT_RWSIZE=1024
+#options               NFS_BOOT_RWSIZE=1024
 
 # Compatibility options
 
@@ -143,7 +143,7 @@
 #options       KMEMSTATS       # kernel memory statistics
 #options       SCSIVERBOSE     # Verbose SCSI errors
 #options       MIIVERBOSE      # Verbose MII autoconfuration messages
-#options       DDB_KEYCODE=0x40
+options        DDB_KEYCODE=0x40
 #options       USERCONF        # userconf(4) support
 #options       PIPE_SOCKETPAIR # smaller, but slower pipe(2)
 
@@ -156,9 +156,10 @@
 options        PMAP_DEBUG      # Enable pmap_debug_level code
 #options       IPKDB           # remote kernel debugging
 options        VERBOSE_INIT_ARM # verbose bootstraping messages
-#options       DDB             # in-kernel debugger
-#options       DDB_ONPANIC=1
-#options       DDB_HISTORY_SIZE=100    # Enable history editing in DDB
+options        DDB             # in-kernel debugger
+options                DDB_ONPANIC=1
+options        DDB_HISTORY_SIZE=100    # Enable history editing in DDB
+options DDB_VERBOSE_HELP
 #options       KGDB
 makeoptions    DEBUG="-g"      # compile full symbol table
 makeoptions    COPY_SYMTAB=1
@@ -188,7 +189,7 @@
 
 # The boot cpu and secondary CPUs
 cpu0           at mainbus?
-#cpu?          at mainbus?                     # Multiprocessor
+cpu*           at mainbus?                     # Multiprocessor
 
 # core devices
 armperiph0     at mainbus?
diff -r 41deacb0cdb6 -r 4a3fe2e30312 sys/arch/evbarm/conf/files.exynos
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/evbarm/conf/files.exynos Sun Dec 06 00:31:24 2015 +0000
@@ -0,0 +1,12 @@
+#      $NetBSD: files.exynos,v 1.1 2015/12/06 00:31:24 marty Exp $
+#
+# EXYNOS 5422 board configuration info
+#
+
+file   arch/evbarm/exynos/exynos_machdep.c
+
+# Kernel boot arguments
+defparam opt_machdep.h                         BOOT_ARGS
+
+# Pull in Exynos SoC default
+include        "arch/arm/samsung/files.exynos"
diff -r 41deacb0cdb6 -r 4a3fe2e30312 sys/arch/evbarm/conf/mk.exynos
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/evbarm/conf/mk.exynos    Sun Dec 06 00:31:24 2015 +0000
@@ -0,0 +1,38 @@
+#      $NetBSD: mk.exynos,v 1.1 2015/12/06 00:31:24 marty Exp $
+
+.if !empty(MACHINE_ARCH:M*eb)
+EXTRA_LINKFLAGS+=      --be8
+.endif
+
+SYSTEM_FIRST_OBJ=      exynos_start.o
+SYSTEM_FIRST_SFILE=    ${THISARM}/exynos/exynos_start.S
+AFLAGS.exynos_start.S+=        -Wa,-march=armv7-a+virt
+
+GENASSYM_EXTRAS+=      ${THISARM}/exynos/genassym.cf
+
+_OSRELEASE!=           ${HOST_SH} $S/conf/osrelease.sh
+
+KERNEL_BASE_PHYS?=$(LOADADDRESS)
+KERNEL_BASE_VIRT?=$(LOADADDRESS)
+
+MKUBOOTIMAGEARGS=      -A arm -T kernel
+MKUBOOTIMAGEARGS+=     -a $(KERNEL_BASE_PHYS) -e $(KERNEL_BASE_PHYS)
+MKUBOOTIMAGEARGS+=     -n "NetBSD/$(BOARDTYPE) ${_OSRELEASE}"
+MKUBOOTIMAGEARGS_NONE= ${MKUBOOTIMAGEARGS} -C none
+MKUBOOTIMAGEARGS_GZ=   ${MKUBOOTIMAGEARGS} -C gz
+
+SYSTEM_LD_TAIL_EXTRA+=; \
+       echo ${OBJCOPY} -S -O binary $@ $@.bin; \
+       ${OBJCOPY} -S -O binary $@ $@.bin; \
+       echo ${TOOL_GZIP} -9c $@.bin > $@.bin.gz; \
+       ${TOOL_GZIP} -9c $@.bin > $@.bin.gz; \
+       echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $@.bin.gz $@.gz.ub; \
+       ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $@.bin.gz $@.gz.ub; \
+       echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@.bin $@.ub; \
+       ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@.bin $@.ub; \
+       echo
+
+EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin@}
+EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.ub@}
+EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin.gz@}
+EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.gz.ub@}
diff -r 41deacb0cdb6 -r 4a3fe2e30312 sys/arch/evbarm/conf/std.exynos
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/evbarm/conf/std.exynos   Sun Dec 06 00:31:24 2015 +0000
@@ -0,0 +1,35 @@
+#      $NetBSD: std.exynos,v 1.1 2015/12/06 00:31:24 marty Exp $
+#
+# standard NetBSD/evbarm for EXYNOS options
+
+machine        evbarm arm
+include        "arch/evbarm/conf/std.evbarm"
+
+# Pull in EXYNOS config definitions
+include        "arch/evbarm/conf/files.exynos"
+
+makeoptions    CPUFLAGS="-march=armv7-a -mfpu=neon"
+
+# To support easy transit to ../arch/arm/arm32
+options        MODULAR
+options        MODULAR_DEFAULT_AUTOLOAD
+options        ARM_HAS_VBAR
+options        CORTEX_PMC
+options        __HAVE_CPU_COUNTER
+options        __HAVE_FAST_SOFTINTS            # should be in types.h
+#options       __HAVE_MM_MD_DIRECT_MAPPED_PHYS
+options        TPIDRPRW_IS_CURCPU
+options        KERNEL_BASE_EXT=0x80000000
+options        FPU_VFP
+
+# All shipped Samsung SoC's that are not Samsung products have this
+options        ARM_TRUSTZONE_FIRMWARE
+options                __NO_FIQ
+
+makeoptions    KERNEL_BASE_PHYS="0x80000000"
+makeoptions    KERNEL_BASE_VIRT="0x80000000"
+makeoptions    BOARDTYPE="exynos"
+makeoptions    BOARDMKFRAG="${THISARM}/conf/mk.exynos"
+
+options        ARM_INTR_IMPL="<arch/arm/samsung/exynos_intr.h>"
+options                ARM_GENERIC_TODR



Home | Main Index | Thread Index | Old Index