Module Name: src Committed By: martin Date: Tue Dec 19 12:49:40 UTC 2023
Modified Files: src/sys/arch/netwinder/conf [netbsd-10]: GENERIC Makefile.netwinder.inc kern.ldscript std.netwinder Log Message: Pull up following revision(s) (requested by uwe in ticket #510): sys/arch/netwinder/conf/Makefile.netwinder.inc: revision 1.12 sys/arch/netwinder/conf/std.netwinder: revision 1.17 sys/arch/netwinder/conf/kern.ldscript: revision 1.11 sys/arch/netwinder/conf/GENERIC: revision 1.146 sys/arch/netwinder/conf/GENERIC: revision 1.147 netwinder: specify kernel make variables in the makefile There's not much sense to specify makeoptions in std.netwinder for config(1) to move them to the generated makefile, when there's already Makefile.netwinder.inc where these variables can be specified directly. Move ENTRYPOINT. Do NOT move LOADADDRESS - we don't want to use it as it is kinda wrong and it will override the ld script. Instead explicitly set LINKTEXT to be empty to avoid the common kernel makefile to supply the unwanted -Ttext option. netwinder: fix base, minimize kern.ldscript diff with evbarm New binutils align to 0x10000, not 0x8000 (which makes sense), so adjust the base to be 0x10000 so that we are loaded at a page boundary and (I guess) don't smash the firmware in the first page. While here, sync with ldscript.evbarm. Makes my netwinder boot again. netwinder: GENERIC - trim down some It is still too big to get loaded by the firmware successfully, but these VERBOSE options and -g symtab are the obvious hogs. netwinder: GENERIC - trim down some more Disable more stuff to make GENERIC just about fit. To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.144.4.1 src/sys/arch/netwinder/conf/GENERIC cvs rdiff -u -r1.11 -r1.11.48.1 \ src/sys/arch/netwinder/conf/Makefile.netwinder.inc cvs rdiff -u -r1.10 -r1.10.48.1 src/sys/arch/netwinder/conf/kern.ldscript cvs rdiff -u -r1.16 -r1.16.68.1 src/sys/arch/netwinder/conf/std.netwinder Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/netwinder/conf/GENERIC diff -u src/sys/arch/netwinder/conf/GENERIC:1.144 src/sys/arch/netwinder/conf/GENERIC:1.144.4.1 --- src/sys/arch/netwinder/conf/GENERIC:1.144 Thu Sep 29 10:10:08 2022 +++ src/sys/arch/netwinder/conf/GENERIC Tue Dec 19 12:49:40 2023 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.144 2022/09/29 10:10:08 riastradh Exp $ +# $NetBSD: GENERIC,v 1.144.4.1 2023/12/19 12:49:40 martin Exp $ # # GENERIC machine description file # @@ -54,7 +54,7 @@ file-system FFS # UFS file-system MFS # memory file system file-system NFS # Network file system #file-system ADOSFS # AmigaDOS-compatible file system -file-system EXT2FS # second extended file system (linux) +#file-system EXT2FS # second extended file system (linux) #file-system CD9660 # ISO 9660 + Rock Ridge file system file-system MSDOSFS # MS-DOS file system file-system FDESC # /dev/fd @@ -75,7 +75,7 @@ file-system TMPFS # Efficient memory fi #options UFS_DIRHASH # UFS Large Directory Hashing #options UFS_EXTATTR # Extended attribute support for UFS1 options WAPBL # File system journaling support -options NFSSERVER # Network File System server +#options NFSSERVER # Network File System server # Networking options @@ -130,8 +130,8 @@ options SYSVSHM # System V-like memory options KTRACE # system call tracing, a la ktrace(1) options IRQSTATS # manage IRQ statistics #options SCSIVERBOSE # Verbose SCSI errors -options PCIVERBOSE # Verbose PCI descriptions -options MIIVERBOSE # Verbose MII autoconfuration messages +#options PCIVERBOSE # Verbose PCI descriptions +#options MIIVERBOSE # Verbose MII autoconfuration messages #options PCI_CONFIG_DUMP # verbosely dump PCI config space #options DDB_KEYCODE=0x40 options USERCONF # userconf(4) support @@ -146,8 +146,8 @@ options SYSCTL_INCLUDE_DESCR # Include #options UVMHIST # kernhist for uvm/pmap subsystems options DDB # in-kernel debugger options DDB_HISTORY_SIZE=100 # Enable history editing in DDB -makeoptions DEBUG="-g" # compile full symbol table -makeoptions COPY_SYMTAB=1 +#makeoptions DEBUG="-g" # compile full symbol table +#makeoptions COPY_SYMTAB=1 # see also ksyms below config netbsd root on ? type ? @@ -260,8 +260,8 @@ spkr* at audio? # PC speaker (synthesiz # Pseudo-Devices -pseudo-device crypto # /dev/crypto device -pseudo-device swcrypto # software crypto implementation +#pseudo-device crypto # /dev/crypto device +#pseudo-device swcrypto # software crypto implementation # disk/mass storage pseudo-devices #pseudo-device md # memory disk device (ramdisk) @@ -273,7 +273,7 @@ pseudo-device fss # file system snapsh # network pseudo-devices pseudo-device bpfilter # Berkeley packet filter pseudo-device carp # Common Address Redundancy Protocol -pseudo-device pppoe # PPP over Ethernet (RFC 2516) +#pseudo-device pppoe # PPP over Ethernet (RFC 2516) pseudo-device bridge # simple inter-network bridging #pseudo-device vether # Virtual Ethernet for bridge pseudo-device loop # network loopback Index: src/sys/arch/netwinder/conf/Makefile.netwinder.inc diff -u src/sys/arch/netwinder/conf/Makefile.netwinder.inc:1.11 src/sys/arch/netwinder/conf/Makefile.netwinder.inc:1.11.48.1 --- src/sys/arch/netwinder/conf/Makefile.netwinder.inc:1.11 Mon Aug 24 14:04:24 2015 +++ src/sys/arch/netwinder/conf/Makefile.netwinder.inc Tue Dec 19 12:49:40 2023 @@ -1,8 +1,12 @@ -# $NetBSD: Makefile.netwinder.inc,v 1.11 2015/08/24 14:04:24 uebayasi Exp $ +# $NetBSD: Makefile.netwinder.inc,v 1.11.48.1 2023/12/19 12:49:40 martin Exp $ CPPFLAGS+= -D${MACHINE} SYSTEM_FIRST_OBJ= nwmmu.o SYSTEM_FIRST_SFILE= ${THISARM}/${MACHINE}/nwmmu.S +ENTRYPOINT= nwstart +# don't let Makefile.kern.inc override placement of the text segment +# specified in the ld script KERNLDSCRIPT= ${THISARM}/conf/kern.ldscript +LINKTEXT= # suppress -Ttext Index: src/sys/arch/netwinder/conf/kern.ldscript diff -u src/sys/arch/netwinder/conf/kern.ldscript:1.10 src/sys/arch/netwinder/conf/kern.ldscript:1.10.48.1 --- src/sys/arch/netwinder/conf/kern.ldscript:1.10 Sun Aug 23 08:57:25 2015 +++ src/sys/arch/netwinder/conf/kern.ldscript Tue Dec 19 12:49:40 2023 @@ -1,29 +1,45 @@ -/* $NetBSD: kern.ldscript,v 1.10 2015/08/23 08:57:25 uebayasi Exp $ */ +/* $NetBSD: kern.ldscript,v 1.10.48.1 2023/12/19 12:49:40 martin Exp $ */ -ENTRY(KERNEL_BASE_phys) SECTIONS { + KERNEL_BASE_phys = 0x00010000; + KERNEL_BASE_virt = 0xf0010000; + /* Kernel start: */ - .start : + .start (KERNEL_BASE_phys) : { *(.start) } /* Read-only sections, merged into text segment: */ - .text : + .text (KERNEL_BASE_virt + SIZEOF(.start)) : + AT (LOADADDR(.start) + SIZEOF(.start)) { *(.text) *(.text.*) *(.stub) *(.glue_7t) *(.glue_7) - *(.rodata) *(.rodata.*) } + + PROVIDE(__rodata_start = .); + .rodata : + { + *(.rodata) + *(.rodata.*) + . = ALIGN(64); + __CTOR_LIST__ = .; + *(.ctors) + *(.init_array) + __CTOR_END__ = .; + } + PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); - /* Adjust the address for the data segment to start on the next page + + /* Adjust the address for the data segment to start on the next large page boundary. */ - . = ALIGN(0x8000); + . = ALIGN(0x10000); .data : { __data_start = . ; @@ -35,6 +51,7 @@ SECTIONS *(.sdata) *(.sdata.*) } + . = ALIGN(8); _edata = .; PROVIDE (edata = .); __bss_start = .; @@ -66,25 +83,3 @@ SECTIONS _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; PROVIDE (end = .); } -SECTIONS -{ - KERNEL_BASE_phys = 0x0000c000; - KERNEL_BASE_virt = 0xf000c000; - - .start (KERNEL_BASE_phys) : - { - *(.start) - } =0 - - .text (KERNEL_BASE_virt + SIZEOF(.start)) : - AT (LOADADDR(.start) + SIZEOF(.start)) - { - *(.text) - } =0 - - .data : - AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) - { - *(.data) - } -} Index: src/sys/arch/netwinder/conf/std.netwinder diff -u src/sys/arch/netwinder/conf/std.netwinder:1.16 src/sys/arch/netwinder/conf/std.netwinder:1.16.68.1 --- src/sys/arch/netwinder/conf/std.netwinder:1.16 Fri Sep 21 14:22:37 2012 +++ src/sys/arch/netwinder/conf/std.netwinder Tue Dec 19 12:49:40 2023 @@ -1,4 +1,4 @@ -# $NetBSD: std.netwinder,v 1.16 2012/09/21 14:22:37 matt Exp $ +# $NetBSD: std.netwinder,v 1.16.68.1 2023/12/19 12:49:40 martin Exp $ # # standard NetBSD/netwinder options @@ -16,8 +16,5 @@ options _ARM32_NEED_BUS_DMA_BOUNCE options ARM_INTR_IMPL="<arm/footbridge/footbridge_intr.h>" -makeoptions LOADADDRESS="0xF000C000" -makeoptions ENTRYPOINT="nwstart" - # Firmware leaves pckbc uninited options PCKBC_CNATTACH_SELFTEST