Add a new installer image for Raspberry PI to evbarm
Includes the following major changes: 1) Add new configmenu item to sysinst to allow creation of users at post-install time. 2) Add an sshramdisk type to evbarm, which is a ramdisk with sshd enabled, allowing users to install on a headless PI by sshing to the device with the account "sysinst" password "netbsd" to begin the installation. (Note, neither the account, nor the ssh setup are copied to the finalized installation image) 3) Change mkimage to build a boot-only image, without the root filesystems. Much of the sshramdisk code could be reused on other ports easily.
This commit is contained in:
parent
6c49ed342b
commit
4daade7385
@ -1,6 +1,6 @@
|
||||
# $NetBSD: Makefile,v 1.3 2002/05/02 18:02:33 lukem Exp $
|
||||
# $NetBSD: Makefile,v 1.4 2013/03/19 22:16:52 garbled Exp $
|
||||
|
||||
SUBDIR= ramdisk .WAIT instkernel
|
||||
SUBDIR= ramdisk sshramdisk .WAIT instkernel
|
||||
TARGETS+= release
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
@ -1,10 +1,12 @@
|
||||
# $NetBSD: Makefile,v 1.18 2013/01/30 13:53:54 he Exp $
|
||||
# $NetBSD: Makefile,v 1.19 2013/03/19 22:16:53 garbled Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
|
||||
|
||||
RAMDISKDIR!= cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
|
||||
RAMDISK= ${RAMDISKDIR}/ramdisk.fs
|
||||
SSHRAMDISKDIR!= cd ${.CURDIR}/../sshramdisk && ${PRINTOBJDIR}
|
||||
SSHRAMDISK= ${SSHRAMDISKDIR}/sshramdisk.fs
|
||||
|
||||
.if ${MACHINE_ARCH} == "arm"
|
||||
# Little endian platforms.
|
||||
@ -20,6 +22,7 @@ MDSETTARGETS= ADI_BRH_INSTALL ${RAMDISK} - \
|
||||
OPENRD_INSTALL ${RAMDISK} - \
|
||||
TS7200_INSTALL ${RAMDISK} - \
|
||||
TEAMASA_NPWR_INSTALL ${RAMDISK} - \
|
||||
RPI_INSTALL ${SSHRAMDISK} - \
|
||||
KUROBOX_PRO_INSTALL ${RAMDISK} -
|
||||
.else
|
||||
# Big endian platforms.
|
||||
|
47
distrib/evbarm/instkernel/sshramdisk/Makefile
Normal file
47
distrib/evbarm/instkernel/sshramdisk/Makefile
Normal file
@ -0,0 +1,47 @@
|
||||
# $NetBSD: Makefile,v 1.1 2013/03/19 22:16:53 garbled Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
|
||||
|
||||
IMAGE= sshramdisk.fs
|
||||
IMAGESIZE= 3572k
|
||||
MAKEFS_FLAGS= -f 15
|
||||
|
||||
WARNS= 1
|
||||
DBG= -Os
|
||||
|
||||
CRUNCHBIN= ramdiskbin
|
||||
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst
|
||||
MTREECONF= ${.CURDIR}/mtree.conf
|
||||
IMAGEENDIAN= le
|
||||
MAKEDEVTARGETS= ramdisk
|
||||
IMAGEDEPENDS= ${CRUNCHBIN} \
|
||||
dot.profile master.passwd sshd_config ssh_host_dsa_key \
|
||||
${NETBSDSRCDIR}/etc/group \
|
||||
${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
|
||||
${DISTRIBDIR}/common/services
|
||||
|
||||
# Use stubs to eliminate some large stuff from libc
|
||||
HACKSRC= ${DISTRIBDIR}/utils/libhack
|
||||
.include "${HACKSRC}/Makefile.inc"
|
||||
${CRUNCHBIN}: libhack.o
|
||||
|
||||
USE_PAM := no
|
||||
USE_YP := no
|
||||
USE_SKEY := no
|
||||
USE_KERBEROS := no
|
||||
USE_LDAP := no
|
||||
.export USE_PAM
|
||||
.export USE_YP
|
||||
.export USE_SKEY
|
||||
.export USE_KERBEROS
|
||||
.export USE_LDAP
|
||||
|
||||
.include "${DISTRIBDIR}/common/Makefile.crunch"
|
||||
.include "${DISTRIBDIR}/common/Makefile.dhcpcd"
|
||||
.include "${DISTRIBDIR}/common/Makefile.makedev"
|
||||
.include "${DISTRIBDIR}/common/Makefile.image"
|
||||
|
||||
release:
|
||||
|
||||
.include <bsd.prog.mk>
|
75
distrib/evbarm/instkernel/sshramdisk/dot.profile
Normal file
75
distrib/evbarm/instkernel/sshramdisk/dot.profile
Normal file
@ -0,0 +1,75 @@
|
||||
# $NetBSD: dot.profile,v 1.1 2013/03/19 22:16:53 garbled Exp $
|
||||
#
|
||||
# Copyright (c) 1997 Perry E. Metzger
|
||||
# Copyright (c) 1994 Christopher G. Demetriou
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed for the
|
||||
# NetBSD Project. See http://www.NetBSD.org/ for
|
||||
# information about NetBSD.
|
||||
# 4. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
|
||||
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
|
||||
export PATH
|
||||
TERM=vt100
|
||||
export TERM
|
||||
HOME=/
|
||||
export HOME
|
||||
|
||||
umask 022
|
||||
|
||||
ROOTDEV=/dev/md0a
|
||||
|
||||
if [ "X${DONEPROFILE}" = "X" ]; then
|
||||
DONEPROFILE=YES
|
||||
export DONEPROFILE
|
||||
|
||||
# set up some sane defaults
|
||||
echo 'erase ^H, werase ^W, kill ^U, intr ^C'
|
||||
stty newcrt werase ^W intr ^C kill ^U erase ^H
|
||||
echo ''
|
||||
|
||||
# mount the ramdisk read write
|
||||
mount -u $ROOTDEV /
|
||||
|
||||
# mount the kern_fs so that we can examine the dmesg state
|
||||
mount -t kernfs /kern /kern
|
||||
|
||||
# run the installation or upgrade script.
|
||||
if [ -x "/sbin/dhcpcd" ]; then
|
||||
echo "starting dhcpcd, waiting for carrier"
|
||||
/sbin/dhcpcd -d -n -w
|
||||
if [ -x "/usr/sbin/sshd" ]; then
|
||||
echo "sleeping 5 seconds, then starting sshd:"
|
||||
sleep 5
|
||||
/usr/sbin/sshd
|
||||
fi
|
||||
fi
|
||||
echo
|
||||
echo
|
||||
echo "Please run sysinst to begin your installation."
|
||||
fi
|
27
distrib/evbarm/instkernel/sshramdisk/inst.profile
Normal file
27
distrib/evbarm/instkernel/sshramdisk/inst.profile
Normal file
@ -0,0 +1,27 @@
|
||||
# $NetBSD: inst.profile,v 1.1 2013/03/19 22:16:53 garbled Exp $
|
||||
|
||||
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
|
||||
export PATH
|
||||
TERM=vt100
|
||||
export TERM
|
||||
HOME=/
|
||||
export HOME
|
||||
|
||||
umask 022
|
||||
|
||||
if [ "X${DONEPROFILE}" = "X" ]; then
|
||||
DONEPROFILE=YES
|
||||
export DONEPROFILE
|
||||
|
||||
# set up some sane defaults
|
||||
echo 'erase ^H, werase ^W, kill ^U, intr ^C'
|
||||
stty newcrt werase ^W intr ^C kill ^U erase ^H
|
||||
echo ''
|
||||
|
||||
# run the installation or upgrade script.
|
||||
echo "starting sysinst!"
|
||||
cd /
|
||||
/sysinst
|
||||
echo "If you have completed your install, please reboot"
|
||||
echo "into your new OS, otherwise, run sysinst again."
|
||||
fi
|
91
distrib/evbarm/instkernel/sshramdisk/list
Normal file
91
distrib/evbarm/instkernel/sshramdisk/list
Normal file
@ -0,0 +1,91 @@
|
||||
# $NetBSD: list,v 1.1 2013/03/19 22:16:53 garbled Exp $
|
||||
|
||||
SRCDIRS bin sbin external/bsd/less/bin crypto/external/bsd/openssh/bin/sshd usr.bin usr.sbin
|
||||
|
||||
PROG bin/cat
|
||||
PROG bin/chmod
|
||||
PROG bin/cp
|
||||
PROG bin/dd
|
||||
PROG bin/df
|
||||
PROG bin/ed
|
||||
PROG bin/ln
|
||||
PROG bin/ls
|
||||
PROG bin/mkdir
|
||||
PROG bin/mv
|
||||
PROG bin/pax usr/bin/tar
|
||||
PROG bin/pwd
|
||||
PROG bin/rm
|
||||
PROG bin/rmdir
|
||||
PROG bin/sh
|
||||
PROG bin/stty
|
||||
PROG bin/sync
|
||||
PROG bin/sleep
|
||||
|
||||
PROG sbin/chown bin/chgrp
|
||||
PROG sbin/disklabel
|
||||
PROG sbin/fdisk
|
||||
PROG sbin/fsck
|
||||
PROG sbin/fsck_msdos
|
||||
PROG sbin/fsck_ffs
|
||||
PROG sbin/gpt
|
||||
PROG sbin/ifconfig
|
||||
PROG sbin/init
|
||||
PROG sbin/mknod
|
||||
PROG sbin/mount
|
||||
PROG sbin/mount_cd9660
|
||||
PROG sbin/mount_ext2fs
|
||||
PROG sbin/mount_ffs
|
||||
PROG sbin/mount_kernfs
|
||||
PROG sbin/mount_msdos
|
||||
PROG sbin/mount_nfs
|
||||
PROG sbin/mount_tmpfs
|
||||
PROG sbin/newfs sbin/mount_mfs
|
||||
PROG sbin/newfs_ext2fs
|
||||
PROG sbin/ping
|
||||
PROG sbin/reboot sbin/halt
|
||||
PROG sbin/restore sbin/rrestore
|
||||
PROG sbin/route
|
||||
PROG sbin/shutdown
|
||||
PROG sbin/slattach
|
||||
PROG sbin/swapctl
|
||||
PROG sbin/umount
|
||||
|
||||
PROG usr/bin/ftp
|
||||
PROG usr/bin/tip usr/bin/cu
|
||||
PROG usr/bin/gzip usr/bin/gzcat usr/bin/gunzip
|
||||
PROG usr/bin/less usr/bin/more
|
||||
PROG usr/bin/sed
|
||||
PROG usr/bin/tset
|
||||
|
||||
PROG usr/sbin/chroot
|
||||
PROG usr/sbin/sshd
|
||||
|
||||
SPECIAL ed srcdir distrib/utils/x_ed
|
||||
SPECIAL gzip srcdir distrib/utils/x_gzip
|
||||
SPECIAL ping srcdir distrib/utils/x_ping
|
||||
SPECIAL ifconfig srcdir distrib/utils/x_ifconfig
|
||||
SPECIAL route srcdir distrib/utils/x_route
|
||||
SPECIAL umount srcdir distrib/utils/x_umount
|
||||
SPECIAL sshd srcdir crypto/external/bsd/openssh/bin/sshd
|
||||
SPECIAL sshd keepsymbols allow_severity deny_severity
|
||||
|
||||
LIBS libhack.o -ledit -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lprop -lssh -lcrypto -lwrap
|
||||
|
||||
# init invokes the shell as -sh
|
||||
ARGVLN sh -sh
|
||||
|
||||
# we need the boot blocks /usr/mdec
|
||||
#COPY ${DESTDIR}/usr/mdec/ofwboot usr/mdec/ofwboot
|
||||
|
||||
# various files that we need in /etc for the install
|
||||
COPY ${NETBSDSRCDIR}/etc/group etc/group
|
||||
COPY ${CURDIR}/master.passwd etc/master.passwd 600
|
||||
COPY ${NETBSDSRCDIR}/etc/netconfig etc/netconfig
|
||||
COPY ${DISTRIBDIR}/common/protocols etc/protocols
|
||||
COPY ${DISTRIBDIR}/common/services etc/services
|
||||
|
||||
# and the installation tools
|
||||
COPY ${CURDIR}/dot.profile .profile
|
||||
COPY ${CURDIR}/inst.profile inst/.profile
|
||||
COPY ${CURDIR}/sshd_config etc/ssh/sshd_config
|
||||
COPY ${CURDIR}/ssh_host_dsa_key etc/ssh/ssh_host_dsa_key 600
|
24
distrib/evbarm/instkernel/sshramdisk/master.passwd
Normal file
24
distrib/evbarm/instkernel/sshramdisk/master.passwd
Normal file
@ -0,0 +1,24 @@
|
||||
root::0:0::0:0:Charlie &:/root:/bin/sh
|
||||
sysinst:EHDz7/tNTWGFA:0:0::0:0:System Installer:/inst:/bin/sh
|
||||
pi:aBrzVC9eLEoh.:0:0::0:0:System Installer:/inst:/bin/sh
|
||||
toor:*:0:0::0:0:Bourne-again Superuser:/root:/bin/sh
|
||||
daemon:*:1:1::0:0:The devil himself:/:/sbin/nologin
|
||||
operator:*:2:5::0:0:System &:/usr/guest/operator:/sbin/nologin
|
||||
bin:*:3:7::0:0:Binaries Commands and Source:/:/sbin/nologin
|
||||
games:*:7:13::0:0:& pseudo-user:/usr/games:/sbin/nologin
|
||||
postfix:*:12:12::0:0:& pseudo-user:/var/spool/postfix:/sbin/nologin
|
||||
named:*:14:14::0:0:& pseudo-user:/var/chroot/named:/sbin/nologin
|
||||
ntpd:*:15:15::0:0:& pseudo-user:/var/chroot/ntpd:/sbin/nologin
|
||||
sshd:*:16:16::0:0:& pseudo-user:/var/chroot/sshd:/sbin/nologin
|
||||
_pflogd:*:18:18::0:0:& pseudo-user:/var/chroot/pflogd:/sbin/nologin
|
||||
_rwhod:*:19:19::0:0:& pseudo-user:/var/rwho:/sbin/nologin
|
||||
_proxy:*:21:21::0:0:Proxy Services:/nonexistent:/sbin/nologin
|
||||
_timedc:*:22:22::0:0:& pseudo-user:/nonexistent:/sbin/nologin
|
||||
_sdpd:*:23:23::0:0:& pseudo-user:/nonexistent:/sbin/nologin
|
||||
_httpd:*:24:24::0:0:& pseudo-user:/var/www:/sbin/nologin
|
||||
_mdnsd:*:25:25::0:0:& pseudo-user:/nonexistent:/sbin/nologin
|
||||
_tests:*:26:26::0:0:& pseudo-user:/nonexistent:/sbin/nologin
|
||||
_tcpdump:*:27:27::0:0:& pseudo-user:/var/chroot/tcpdump:/sbin/nologin
|
||||
_tss:*:28:28::0:0:& pseudo-user:/var/tpm:/sbin/nologin
|
||||
uucp:*:66:1::0:0:UNIX-to-UNIX Copy:/nonexistent:/sbin/nologin
|
||||
nobody:*:32767:39::0:0:Unprivileged user:/nonexistent:/sbin/nologin
|
32
distrib/evbarm/instkernel/sshramdisk/mtree.conf
Normal file
32
distrib/evbarm/instkernel/sshramdisk/mtree.conf
Normal file
@ -0,0 +1,32 @@
|
||||
# $NetBSD: mtree.conf,v 1.1 2013/03/19 22:16:53 garbled Exp $
|
||||
|
||||
/set type=dir uname=root gname=wheel mode=0755
|
||||
|
||||
.
|
||||
./bin
|
||||
./dev
|
||||
./etc
|
||||
./etc/ssh
|
||||
./inst
|
||||
./libexec
|
||||
./libexec/dhcpcd-hooks
|
||||
./mnt
|
||||
./mnt2
|
||||
./kern
|
||||
./sbin
|
||||
./targetroot
|
||||
./tmp mode=01777
|
||||
./usr
|
||||
./usr/bin
|
||||
./usr/mdec
|
||||
./usr/sbin
|
||||
./usr/share
|
||||
./usr/share/misc
|
||||
./var
|
||||
./var/chroot
|
||||
./var/chroot/sshd
|
||||
./var/db
|
||||
./var/run
|
||||
./var/log
|
||||
./var/spool
|
||||
./var/spool/lock
|
27
distrib/evbarm/instkernel/sshramdisk/ssh_host_dsa_key
Normal file
27
distrib/evbarm/instkernel/sshramdisk/ssh_host_dsa_key
Normal file
@ -0,0 +1,27 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEogIBAAKCAQEA2O4DZIR5YH7ESnvKmdTfJbPDzDZt44chEe27eFf28AhnfGYW
|
||||
962xKQbzzZqmMsH19CUAxpQ1UJ/o9MPULCZvYDwhn6t0cT3oNaIhj774Nw5Uni99
|
||||
d0DV/PSPsZlk22MySEsXI5rygnUg0ZMEQbw3pPlRYb8pjUwbkgsxR6KCDanFMhuK
|
||||
DtCTKbtK/y06BpievoFpENGpwwamfbpQxjK0MvT1TU744eKfBcWPtBl2KZM0cnbS
|
||||
vxNAvkSQrku2Sb56JzBo7b1TlxeDjBwHmdoFbUWjmXV5YsNkNdXvx52cro5o+z1f
|
||||
obpul8qpy+WQOsucRbltzfcBSRQ7lA09D4Hg5QIDAQABAoIBADQsOmCog9CzbF5F
|
||||
m5qX2ftlWsf4p0E7tLZtKNNuxJNCUjFXFFsJSTyG0Yg3k5VNlOvdImygJJp5ezuz
|
||||
BYqAy/SnQab3Q5AgxYJwtgWudmA3cB6DaXeO/mhSIWUjcWBaYTOF69DCaWT66qO8
|
||||
6h8tN2zUEcCii0nSbicXzghei0zhgE6RwwD0k07msQIgVX5XERUZSqQVg+Ls+VAu
|
||||
wp1OBW6HeXgSTGuRkzH9UuEobklf+KBtdSj+Nr+NdCg2gh4dNY86u6TT9dLwMw8T
|
||||
h8/oqfdnxlXiU4AfBsxWbHdAiqKBSa5IG2+4IsX4Zt3lKjygpRndNzqetfgjsz69
|
||||
ebbyjQECgYEA/GgDqx7k6QWOibKKb8DjdGfy+HdGqU5Bm9hSuhFHIwm0zSy+QbfV
|
||||
Z5nj1zj2pnm1/yfPKMrMEnZWuDTxMkgDQLv4UPdbWPvbBcowZWfy5st/bDOWtq9E
|
||||
SuHci941pNN9kqHDmDk9HPoHcYXmk4mA4W10lSGIHoxH3uCrbBeKj8UCgYEA3ASx
|
||||
GdmciAKOAt6gQzqOjWBs20CRqUvsonx5gagUOVmixpZrBumjNiEQg8kTCJF0pQ9O
|
||||
iWYTqqmzQCpw7HZsAMsjILUhZErGajbiAQ4Q7XOFvdGjfR1qZGgw/Qrx5MVmlwOo
|
||||
l3+PPdUP9shRbWFN0fbti9p+yvp9Pjltsp9Y/qECgYB9DrAandD/H3CzCtIKcsB/
|
||||
kW1R7A8Hna1mIPVEGYFse8eoDK4rc4D5tsargR679vvUcw3yASDBWP64gAqtRf7O
|
||||
mRN8UkJhQVAQe1AlPi6caWE15A2dcBNfIq8aYbukceD6wMlfZ6S+8aa0eYp3uR4x
|
||||
EwE7ToTZ1dlaNWjZwoQ1nQKBgBHtX/DXRmXer2uUcEKKFut2G+iRjkzZHuLueYgT
|
||||
BfLWVukPgJEDoITclNfoHmDoWTTJ1oBjjN6vDSgBTUo3K/20j5wuphXh8eDdr/Se
|
||||
DMsMSq1403VyXCTqSHOV3LfjTcSoS6hsgGNtZOuazue2sfyVvi1TFFm9p07WpxWS
|
||||
3lGBAoGAEzrlLi1veWatprss9qRYF3nKiMnf/K7J65EWOtZEOWwYHmmoUSMKo3Oy
|
||||
m8snS1RvJcorLnqUpkGEnhaF9XD2QFHwxUiTrvSQVkk5XTURjmJmWjnwCTMVlrF+
|
||||
1ce9hqg0uVc08TW4+Th3sZPBGqN2nrkPYUxYHSu6mLoR3R5j+2s=
|
||||
-----END RSA PRIVATE KEY-----
|
20
distrib/evbarm/instkernel/sshramdisk/sshd_config
Normal file
20
distrib/evbarm/instkernel/sshramdisk/sshd_config
Normal file
@ -0,0 +1,20 @@
|
||||
# $NetBSD: sshd_config,v 1.1 2013/03/19 22:16:53 garbled Exp $
|
||||
|
||||
# Special cut-down sshd_config for sshramdisk
|
||||
# Tim Rightnour <garbled@NetBSD.org>
|
||||
|
||||
#Port 22
|
||||
#AddressFamily any
|
||||
#ListenAddress 0.0.0.0
|
||||
#ListenAddress ::
|
||||
#Protocol 2
|
||||
#HostKey /etc/ssh/ssh_host_dsa_key
|
||||
LoginGraceTime 600
|
||||
# needed because sysinst is uid 0
|
||||
PermitRootLogin yes
|
||||
AuthorizedKeysFile .ssh/authorized_keys
|
||||
PasswordAuthentication yes
|
||||
# just in case
|
||||
PermitEmptyPasswords yes
|
||||
UsePrivilegeSeparation sandbox
|
||||
AllowUsers pi sysinst
|
122
distrib/utils/embedded/conf/rpi_inst.conf
Normal file
122
distrib/utils/embedded/conf/rpi_inst.conf
Normal file
@ -0,0 +1,122 @@
|
||||
# $NetBSD: rpi_inst.conf,v 1.1 2013/03/19 22:16:53 garbled Exp $
|
||||
# Raspberry Pi customization script used by mkimage
|
||||
#
|
||||
|
||||
board=rpi_inst
|
||||
kernel=$src/sys/arch/evbarm/compile/RPI/netbsd-RPI_INSTALL.bin
|
||||
|
||||
image=$HOME/${board}.img
|
||||
|
||||
specialdirs="/kern /proc"
|
||||
|
||||
swap=8
|
||||
extra=8 # spare space
|
||||
boot=112
|
||||
init=8
|
||||
|
||||
size=$(( 10485760 + ${swap} * 1024 * 512 + ${boot} * 1024 * 512 + ${init} * 1024 * 512 ))
|
||||
msdosid=12
|
||||
|
||||
make_label_evbarm() {
|
||||
# compute all sizes in terms of sectors
|
||||
local totalsize=$(( ${newsize} * 1024 * 2 / 512 ))
|
||||
|
||||
local swapsize=$(( ${swap} * 1024 ))
|
||||
local bootsize=$(( ${boot} * 1024 ))
|
||||
|
||||
local bootoffset=$(( ${init} * 1024 ))
|
||||
local swapoffset=$(( ${bootoffset} + ${bootsize} ))
|
||||
|
||||
local asize=$(( ${totalsize} - ${swapsize} - ${bootsize} - ${bootoffset} ))
|
||||
local aoffset=$(( ${swapoffset} + ${swapsize} ))
|
||||
|
||||
local bps=512
|
||||
local spt=32
|
||||
local tpc=64
|
||||
local spc=2048
|
||||
local cylinders=$(( ${totalsize} / ${spc} ))
|
||||
|
||||
cat << EOF
|
||||
type: SCSI
|
||||
disk: STORAGE DEVICE
|
||||
label: fictitious
|
||||
flags: removable
|
||||
bytes/sector: ${bps}
|
||||
sectors/track: ${spt}
|
||||
tracks/cylinder: ${tpc}
|
||||
sectors/cylinder: ${spc}
|
||||
cylinders: ${cylinders}
|
||||
total sectors: ${totalsize}
|
||||
rpm: 3600
|
||||
interleave: 1
|
||||
trackskew: 0
|
||||
cylinderskew: 0
|
||||
headswitch: 0 # microseconds
|
||||
track-to-track seek: 0 # microseconds
|
||||
drivedata: 0
|
||||
|
||||
8 partitions:
|
||||
# size offset fstype [fsize bsize cpg/sgs]
|
||||
a: ${asize} ${aoffset} 4.2BSD ${fsize} ${bsize} 0 #
|
||||
b: ${swapsize} ${swapoffset} swap #
|
||||
d: ${totalsize} 0 unused 0 0 #
|
||||
e: ${bootsize} ${bootoffset} MSDOS #
|
||||
EOF
|
||||
}
|
||||
|
||||
make_fstab_evbarm() {
|
||||
}
|
||||
|
||||
customize_evbarm() {
|
||||
echo "${bar} creating directories ${bar}"
|
||||
mkdir ${mnt}/proc ${mnt}/kern
|
||||
}
|
||||
firmwaredir=$src/external/broadcom/rpi-firmware/dist
|
||||
firmwarefiles="LICENCE.broadcom bootcode.bin fixup.dat fixup_cd.dat start.elf start_cd.elf"
|
||||
|
||||
make_filesystems() {
|
||||
make_filesystems_evbarm
|
||||
}
|
||||
|
||||
make_fstab() {
|
||||
make_fstab_evbarm
|
||||
}
|
||||
|
||||
make_label() {
|
||||
make_label_evbarm
|
||||
}
|
||||
|
||||
customize() {
|
||||
customize_evbarm
|
||||
}
|
||||
|
||||
populate() {
|
||||
cat > ${mnt}/boot/cmdline.txt << EOF
|
||||
root=ld0a console=fb
|
||||
#fb=1280x1024 # to select a mode, otherwise try EDID
|
||||
#fb=disable # to disable fb completely
|
||||
EOF
|
||||
if [ ! -f ${kernel} ]; then
|
||||
echo ${PROG}: Missing ${kernel} 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${bar} installing kernel ${bar}"
|
||||
case ${kernel} in
|
||||
*.gz)
|
||||
gzip -dc ${kernel} > ${mnt}/boot/kernel.img
|
||||
;;
|
||||
*)
|
||||
cp ${kernel} ${mnt}/boot/kernel.img
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "${bar} installing firmware files ${bar}"
|
||||
(cd ${mnt}/boot &&
|
||||
for f in ${firmwarefiles}; do
|
||||
echo " $f"
|
||||
cp ${firmwaredir}/${f} .
|
||||
done
|
||||
)
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: mkimage,v 1.35 2013/02/15 00:13:06 christos Exp $
|
||||
# $NetBSD: mkimage,v 1.36 2013/03/19 22:16:53 garbled Exp $
|
||||
#
|
||||
# Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
@ -68,13 +68,13 @@ getsize() {
|
||||
|
||||
usage() {
|
||||
cat << EOF 1>&2
|
||||
Usage: $PROG -h <host-arch> [-K <kerneldir>] [-S <srcdir>] [-D <destdir>] [-c <custom-files-dir>] [-s <Mb size>] [<image>]
|
||||
Usage: $PROG -h <host-arch> [-b] [-K <kerneldir>] [-S <srcdir>] [-D <destdir>] [-c <custom-files-dir>] [-s <Mb size>] [<image>]
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
# First pass for options to get the host and src directories
|
||||
OPTS="K:D:S:c:h:s:x"
|
||||
OPTS="K:D:S:bc:h:s:x"
|
||||
while getopts "$OPTS" f
|
||||
do
|
||||
case $f in
|
||||
@ -106,6 +106,7 @@ do
|
||||
D) release="$OPTARG";;
|
||||
K) kernel="$OPTARG";;
|
||||
S) ;;
|
||||
b) bootonly="true";;
|
||||
c) custom="$OPTARG";;
|
||||
h) ;;
|
||||
s) size="$OPTARG";;
|
||||
@ -126,32 +127,38 @@ case "$image" in
|
||||
*) compress=false;;
|
||||
esac
|
||||
|
||||
echo ${bar} configuring sets ${bar}
|
||||
(echo '/set type=dir uname=root gname=wheel mode=0755'
|
||||
for i in $selected_sets; do
|
||||
s="${release}/etc/mtree/set.$i"
|
||||
if [ -f "$s" ]; then
|
||||
cat "$s"
|
||||
fi
|
||||
done) > "$tmp/selected_sets"
|
||||
if [ -z "$bootonly" ]; then
|
||||
echo ${bar} configuring sets ${bar}
|
||||
(echo '/set type=dir uname=root gname=wheel mode=0755'
|
||||
for i in $selected_sets; do
|
||||
s="${release}/etc/mtree/set.$i"
|
||||
if [ -f "$s" ]; then
|
||||
cat "$s"
|
||||
fi
|
||||
done) > "$tmp/selected_sets"
|
||||
fi
|
||||
|
||||
make_fstab
|
||||
customize
|
||||
populate
|
||||
|
||||
(cd ${mnt}; ${MTREE} -N ${release}/etc -c -k all |
|
||||
${MTREE} -N ${release}/etc -C -k all) >> "$tmp/selected_sets"
|
||||
if [ -z "$bootonly" ]; then
|
||||
(cd ${mnt}; ${MTREE} -N ${release}/etc -c -k all |
|
||||
${MTREE} -N ${release}/etc -C -k all) >> "$tmp/selected_sets"
|
||||
fi
|
||||
if [ -n ${msdosid} ]; then
|
||||
echo ${bar} Populating msdos filesystem ${bar}
|
||||
${MAKEFS} -N ${release}/etc -t msdos \
|
||||
-O $((${init} / 2))m -s $((${boot} / 2))m ${image} ${mnt}/boot
|
||||
-O $((${init} / 2))m -s $((${boot} / 2 + ${init} / 2))m ${image} ${mnt}/boot
|
||||
fi
|
||||
|
||||
echo ${bar} Populating ffs filesystem ${bar}
|
||||
${MAKEFS} -N ${release}/etc -t ffs -rx \
|
||||
-O $(((${init} + ${boot} + ${swap}) / 2))m \
|
||||
-b $((${extra} / 2))m \
|
||||
-F "$tmp/selected_sets" ${image} "${release}" "${mnt}"
|
||||
if [ -z "$bootonly" ]; then
|
||||
echo ${bar} Populating ffs filesystem ${bar}
|
||||
${MAKEFS} -N ${release}/etc -t ffs -rx \
|
||||
-O $(((${init} + ${boot} + ${swap}) / 2))m \
|
||||
-b $((${extra} / 2))m \
|
||||
-F "$tmp/selected_sets" ${image} "${release}" "${mnt}"
|
||||
fi
|
||||
|
||||
if [ "${size}" = 0 ]; then
|
||||
size="$(getsize "${image}")"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: md.c,v 1.26 2012/02/07 09:06:04 nisimura Exp $ */
|
||||
/* $NetBSD: md.c,v 1.27 2013/03/19 22:16:54 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -49,6 +49,15 @@
|
||||
#include "msg_defs.h"
|
||||
#include "menu_defs.h"
|
||||
|
||||
int boardtype = 0, rpi_bootpart = PART_A;
|
||||
|
||||
void
|
||||
md_prelim_menu(void)
|
||||
{
|
||||
/* get the boardtype from the user */
|
||||
process_menu(MENU_prelim, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
md_init(void)
|
||||
{
|
||||
@ -57,7 +66,8 @@ md_init(void)
|
||||
void
|
||||
md_init_set_status(int flags)
|
||||
{
|
||||
(void)flags;
|
||||
if (boardtype == BOARD_TYPE_RPI)
|
||||
set_kernel_set(SET_KERNEL_RPI);
|
||||
}
|
||||
|
||||
int
|
||||
@ -67,6 +77,9 @@ md_get_info(void)
|
||||
int fd;
|
||||
char dev_name[100];
|
||||
|
||||
if (boardtype == BOARD_TYPE_RPI)
|
||||
return set_bios_geom_with_mbr_guess();
|
||||
|
||||
if (no_mbr)
|
||||
return 1;
|
||||
|
||||
@ -131,7 +144,21 @@ md_make_bsd_partitions(void)
|
||||
int
|
||||
md_check_partitions(void)
|
||||
{
|
||||
return 1;
|
||||
int part;
|
||||
|
||||
if (boardtype == BOARD_TYPE_NORMAL)
|
||||
return 1;
|
||||
if (boardtype == BOARD_TYPE_RPI) {
|
||||
for (part = PART_A; part < MAXPARTITIONS; part++)
|
||||
if (bsdlabel[part].pi_fstype == FS_MSDOS) {
|
||||
rpi_bootpart = part;
|
||||
return 1;
|
||||
}
|
||||
|
||||
msg_display(MSG_nomsdospart);
|
||||
process_menu(MENU_ok, NULL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -151,6 +178,11 @@ md_pre_disklabel(void)
|
||||
process_menu(MENU_ok, NULL);
|
||||
return 1;
|
||||
}
|
||||
/* nuke the disklabel from orbit, because d from the gzimg
|
||||
corrupts it hopelessly
|
||||
*/
|
||||
if (boardtype == BOARD_TYPE_RPI)
|
||||
run_program(RUN_DISPLAY, "/sbin/disklabel -D %s", diskdev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -177,6 +209,21 @@ md_post_newfs(void)
|
||||
int
|
||||
md_post_extract(void)
|
||||
{
|
||||
char kernelbin[100];
|
||||
|
||||
if (boardtype == BOARD_TYPE_NORMAL)
|
||||
return 0;
|
||||
if (boardtype == BOARD_TYPE_RPI) {
|
||||
snprintf(kernelbin, 100, "%s/netbsd.bin", targetroot_mnt);
|
||||
if (file_exists_p(kernelbin)) {
|
||||
run_program(RUN_DISPLAY,
|
||||
"/bin/cp %s /targetroot/boot/kernel.img", kernelbin);
|
||||
} else {
|
||||
msg_display(MSG_rpikernelmissing);
|
||||
process_menu(MENU_ok, NULL);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -185,6 +232,8 @@ md_cleanup_install(void)
|
||||
{
|
||||
#ifndef DEBUG
|
||||
enable_rc_conf();
|
||||
add_rc_conf("sshd=YES\n");
|
||||
add_rc_conf("dhcpcd=YES\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -211,11 +260,69 @@ md_pre_mount()
|
||||
int
|
||||
md_check_mbr(mbr_info_t *mbri)
|
||||
{
|
||||
mbr_info_t *ext;
|
||||
struct mbr_partition *part;
|
||||
int i, hasboot=0;
|
||||
|
||||
if (boardtype == BOARD_TYPE_NORMAL)
|
||||
return 2;
|
||||
/* raspi code */
|
||||
if (boardtype == BOARD_TYPE_RPI) {
|
||||
for (ext = mbri; ext; ext = ext->extended) {
|
||||
part = ext->mbr.mbr_parts;
|
||||
for (i=0, hasboot=0; i < MBR_PART_COUNT; part++, i++) {
|
||||
if (part->mbrp_type != MBR_PTYPE_FAT32L)
|
||||
continue;
|
||||
hasboot = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!hasboot) {
|
||||
msg_display(MSG_nomsdospart);
|
||||
msg_display_add(MSG_reeditpart, 0);
|
||||
process_menu(MENU_yesno, NULL);
|
||||
if (!yesno)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
|
||||
int
|
||||
md_mbr_use_wholedisk(mbr_info_t *mbri)
|
||||
{
|
||||
struct mbr_sector *mbrs = &mbri->mbr;
|
||||
struct mbr_partition *part;
|
||||
int offset;
|
||||
|
||||
if (boardtype == BOARD_TYPE_NORMAL) {
|
||||
/* this keeps it from creating /boot as msdos */
|
||||
bootsize = 0;
|
||||
return mbr_use_wholedisk(mbri);
|
||||
}
|
||||
|
||||
/* raspi code */
|
||||
if (boardtype == BOARD_TYPE_RPI) {
|
||||
part = &mbrs->mbr_parts[0];
|
||||
if (part[0].mbrp_type != MBR_PTYPE_FAT32L) {
|
||||
/* It's hopelessly corrupt, punt for now */
|
||||
msg_display(MSG_nomsdospart);
|
||||
process_menu(MENU_ok, NULL);
|
||||
return 0;
|
||||
}
|
||||
offset = part[0].mbrp_start + part[0].mbrp_size;
|
||||
part[1].mbrp_type = MBR_PTYPE_NETBSD;
|
||||
part[1].mbrp_size = dlsize - offset;
|
||||
part[1].mbrp_start = offset;
|
||||
part[1].mbrp_flag = 0;
|
||||
|
||||
ptstart = part[1].mbrp_start;
|
||||
ptsize = part[1].mbrp_size;
|
||||
bootstart = part[0].mbrp_start;
|
||||
bootsize = part[0].mbrp_size;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return mbr_use_wholedisk(mbri);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: md.h,v 1.19 2012/02/07 09:06:04 nisimura Exp $ */
|
||||
/* $NetBSD: md.h,v 1.20 2013/03/19 22:16:54 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -38,6 +38,10 @@
|
||||
#include "mbr.h"
|
||||
|
||||
/* Constants and defines */
|
||||
#define PART_BOOT PART_E
|
||||
#define PART_BOOT_MSDOS PART_BOOT
|
||||
#define PART_BOOT_PI_MOUNT "/boot"
|
||||
#define PART_BOOT_PI_FLAGS PIF_MOUNT
|
||||
|
||||
/* Megs required for a full X installation. */
|
||||
#define XNEEDMB 60
|
||||
@ -56,6 +60,8 @@
|
||||
#define SET_KERNEL_5_NAME "kern-MINI2440"
|
||||
#define SET_KERNEL_6_NAME "kern-TEAMASA_NPWR"
|
||||
#define SET_KERNEL_7_NAME "kern-TS7200"
|
||||
#define SET_KERNEL_8_NAME "kern-RPI"
|
||||
#define SET_KERNEL_RPI SET_KERNEL_8
|
||||
|
||||
#define MD_SETS_SELECTED SET_SYSTEM
|
||||
|
||||
@ -68,3 +74,8 @@
|
||||
* hand-edited disklabel will NOT be written by MI code.
|
||||
*/
|
||||
#define DISKLABEL_CMD "disklabel -w -r"
|
||||
|
||||
/* Special board type routines need a switch */
|
||||
#define BOARD_TYPE_NORMAL 0
|
||||
#define BOARD_TYPE_RPI 1
|
||||
int boardtype;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: menus.md.en,v 1.7 2011/04/04 08:30:24 mbalmer Exp $ */
|
||||
/* $NetBSD: menus.md.en,v 1.8 2013/03/19 22:16:54 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -35,3 +35,7 @@
|
||||
|
||||
/* evbarm machine dependent menus, english */
|
||||
|
||||
menu prelim, title "What kind of system do you have?", y=-10;
|
||||
option "Raspberry PI", exit, action { boardtype = 1; };
|
||||
option "Other", exit, action { boardtype = 0; };
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: menus.md.es,v 1.3 2011/04/04 08:30:24 mbalmer Exp $ */
|
||||
/* $NetBSD: menus.md.es,v 1.4 2013/03/19 22:16:54 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -35,3 +35,7 @@
|
||||
|
||||
/* evbarm machine dependent menus, spanish */
|
||||
|
||||
menu prelim, title "What kind of system do you have?", y=-10;
|
||||
option "Raspberry PI", exit, action { boardtype = 1; };
|
||||
option "Other", exit, action { boardtype = 0; };
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: menus.md.fr,v 1.7 2011/04/04 08:30:24 mbalmer Exp $ */
|
||||
/* $NetBSD: menus.md.fr,v 1.8 2013/03/19 22:16:54 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -35,3 +35,7 @@
|
||||
|
||||
/* evbarm machine dependent menus, french */
|
||||
|
||||
menu prelim, title "What kind of system do you have?", y=-10;
|
||||
option "Raspberry PI", exit, action { boardtype = 1; };
|
||||
option "Other", exit, action { boardtype = 0; };
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: menus.md.pl,v 1.7 2011/04/04 08:30:24 mbalmer Exp $ */
|
||||
/* $NetBSD: menus.md.pl,v 1.8 2013/03/19 22:16:54 garbled Exp $ */
|
||||
/* Based on english version: */
|
||||
/* NetBSD: menus.md.en,v 1.2 2002/03/31 02:14:06 thorpej Exp */
|
||||
|
||||
@ -37,3 +37,7 @@
|
||||
|
||||
/* evbarm machine dependent menus, Polish */
|
||||
|
||||
menu prelim, title "What kind of system do you have?", y=-10;
|
||||
option "Raspberry PI", exit, action { boardtype = 1; };
|
||||
option "Other", exit, action { boardtype = 0; };
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msg.md.de,v 1.11 2012/03/01 17:40:31 tsutsui Exp $ */
|
||||
/* $NetBSD: msg.md.de,v 1.12 2013/03/19 22:16:54 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -86,3 +86,11 @@ message set_kernel_6
|
||||
{Kernel (TEAMASA_NPWR)}
|
||||
message set_kernel_7
|
||||
{Kernel (TS7200)}
|
||||
message set_kernel_8
|
||||
{Kernel (RPI)}
|
||||
|
||||
message nomsdospart
|
||||
{There is no MSDOS boot partition in the MBR partition table.}
|
||||
|
||||
message rpikernelmissing
|
||||
{The RPI kernel was not installed, perhaps you didn't select it?}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msg.md.en,v 1.13 2012/03/01 17:40:31 tsutsui Exp $ */
|
||||
/* $NetBSD: msg.md.en,v 1.14 2013/03/19 22:16:54 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -82,3 +82,11 @@ message set_kernel_6
|
||||
{Kernel (TEAMASA_NPWR)}
|
||||
message set_kernel_7
|
||||
{Kernel (TS7200)}
|
||||
message set_kernel_8
|
||||
{Kernel (RPI)}
|
||||
|
||||
message nomsdospart
|
||||
{There is no MSDOS boot partition in the MBR partition table.}
|
||||
|
||||
message rpikernelmissing
|
||||
{The RPI kernel was not installed, perhaps you didn't select it?}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msg.md.es,v 1.10 2012/03/01 17:40:31 tsutsui Exp $ */
|
||||
/* $NetBSD: msg.md.es,v 1.11 2013/03/19 22:16:54 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -85,3 +85,11 @@ message set_kernel_6
|
||||
{Núcleo (TEAMASA_NPWR)}
|
||||
message set_kernel_7
|
||||
{Núcleo (TS7200)}
|
||||
message set_kernel_8
|
||||
{N\xfacleo (RPI)}
|
||||
|
||||
message nomsdospart
|
||||
{There is no MSDOS boot partition in the MBR partition table.}
|
||||
|
||||
message rpikernelmissing
|
||||
{The RPI kernel was not installed, perhaps you didn't select it?}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msg.md.fr,v 1.12 2012/02/03 00:35:35 nisimura Exp $ */
|
||||
/* $NetBSD: msg.md.fr,v 1.13 2013/03/19 22:16:54 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -85,3 +85,11 @@ message set_kernel_6
|
||||
{Kernel (TEAMASA_NPWR)}
|
||||
message set_kernel_7
|
||||
{Kernel (TS7200)}
|
||||
message set_kernel_8
|
||||
{Kernel (RPI)}
|
||||
|
||||
message nomsdospart
|
||||
{There is no MSDOS boot partition in the MBR partition table.}
|
||||
|
||||
message rpikernelmissing
|
||||
{The RPI kernel was not installed, perhaps you didn't select it?}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msg.md.pl,v 1.10 2012/02/03 00:35:35 nisimura Exp $ */
|
||||
/* $NetBSD: msg.md.pl,v 1.11 2013/03/19 22:16:54 garbled Exp $ */
|
||||
/* Based on english version: */
|
||||
/* NetBSD: msg.md.en,v 1.2 2002/04/02 17:02:54 thorpej Exp */
|
||||
|
||||
@ -84,3 +84,11 @@ message set_kernel_6
|
||||
{Kernel (TEAMASA_NPWR)}
|
||||
message set_kernel_7
|
||||
{Kernel (TS7200)}
|
||||
message set_kernel_8
|
||||
{Kernel (RPI)}
|
||||
|
||||
message nomsdospart
|
||||
{There is no MSDOS boot partition in the MBR partition table.}
|
||||
|
||||
message rpikernelmissing
|
||||
{The RPI kernel was not installed, perhaps you didn't select it?}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bsddisklabel.c,v 1.57 2012/11/20 20:17:43 jakllsch Exp $ */
|
||||
/* $NetBSD: bsddisklabel.c,v 1.58 2013/03/19 22:16:53 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -543,6 +543,7 @@ make_bsd_partitions(void)
|
||||
* Initialize global variables that track space used on this disk.
|
||||
* Standard 4.4BSD 8-partition labels always cover whole disk.
|
||||
*/
|
||||
if (logfp) fprintf(logfp, "dlsize=%" PRId64 " ptsize=%" PRId64 " ptstart=%" PRId64 "\n", dlsize,ptsize,ptstart);
|
||||
if (ptsize == 0)
|
||||
ptsize = dlsize - ptstart;
|
||||
if (dlsize == 0)
|
||||
@ -604,7 +605,11 @@ make_bsd_partitions(void)
|
||||
#endif
|
||||
#elif defined(PART_BOOT)
|
||||
if (bootsize != 0) {
|
||||
#if defined(PART_BOOT_MSDOS)
|
||||
bsdlabel[PART_BOOT].pi_fstype = FS_MSDOS;
|
||||
#else
|
||||
bsdlabel[PART_BOOT].pi_fstype = FS_BOOT;
|
||||
#endif
|
||||
bsdlabel[PART_BOOT].pi_size = bootsize;
|
||||
bsdlabel[PART_BOOT].pi_offset = bootstart;
|
||||
#if defined(PART_BOOT_PI_FLAGS)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: configmenu.c,v 1.5 2012/05/15 15:50:58 jdf Exp $ */
|
||||
/* $NetBSD: configmenu.c,v 1.6 2013/03/19 22:16:53 garbled Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -43,6 +43,7 @@ static int set_network(struct menudesc*, void *);
|
||||
static int set_timezone_menu(struct menudesc *, void *);
|
||||
static int set_root_shell(struct menudesc *, void *);
|
||||
static int change_root_password(struct menudesc *, void *);
|
||||
static int add_new_user(struct menudesc *, void *);
|
||||
static int set_binpkg(struct menudesc *, void *);
|
||||
static int set_pkgsrc(struct menudesc *, void *);
|
||||
static void config_list_init(void);
|
||||
@ -67,6 +68,7 @@ enum {
|
||||
CONFIGOPT_NTPD,
|
||||
CONFIGOPT_NTPDATE,
|
||||
CONFIGOPT_MDNSD,
|
||||
CONFIGOPT_ADDUSER,
|
||||
CONFIGOPT_LAST
|
||||
};
|
||||
|
||||
@ -90,6 +92,7 @@ configinfo config_list[] = {
|
||||
{MSG_enable_ntpd, CONFIGOPT_NTPD, "ntpd", toggle_rcvar, NULL},
|
||||
{MSG_run_ntpdate, CONFIGOPT_NTPDATE, "ntpdate", toggle_rcvar, NULL},
|
||||
{MSG_enable_mdnsd, CONFIGOPT_MDNSD, "mdnsd", toggle_rcvar, NULL},
|
||||
{MSG_add_a_user, CONFIGOPT_ADDUSER, NULL, add_new_user, NULL},
|
||||
{NULL, CONFIGOPT_LAST, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
@ -236,6 +239,29 @@ check_root_password(void)
|
||||
return rval;
|
||||
}
|
||||
|
||||
static int
|
||||
add_new_user(struct menudesc *menu, void *arg)
|
||||
{
|
||||
char username[STRSIZE];
|
||||
int inwheel=0;
|
||||
|
||||
msg_prompt(MSG_addusername, NULL, username, sizeof username -1);
|
||||
process_menu(MENU_yesno, deconst(MSG_addusertowheel));
|
||||
inwheel = yesno;
|
||||
ushell = "/bin/csh";
|
||||
process_menu(MENU_usersh, NULL);
|
||||
if (inwheel)
|
||||
run_program(RUN_PROGRESS | RUN_CHROOT,
|
||||
"/usr/sbin/useradd -m -s %s -G wheel %s",
|
||||
ushell, username);
|
||||
else
|
||||
run_program(RUN_PROGRESS | RUN_CHROOT,
|
||||
"/usr/sbin/useradd -m -s %s %s", ushell, username);
|
||||
run_program(RUN_DISPLAY | RUN_PROGRESS | RUN_CHROOT,
|
||||
"passwd -l %s", username);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
change_root_password(struct menudesc *menu, void *arg)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: defs.h,v 1.165 2013/03/16 22:16:02 christos Exp $ */
|
||||
/* $NetBSD: defs.h,v 1.166 2013/03/19 22:16:53 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -327,6 +327,9 @@ char pkg_dir[STRSIZE];
|
||||
/* Place we look for pkgsrc in all fs types */
|
||||
char pkgsrc_dir[STRSIZE];
|
||||
|
||||
/* User shell */
|
||||
const char *ushell;
|
||||
|
||||
struct ftpinfo {
|
||||
char host[STRSIZE];
|
||||
char dir[STRSIZE] ;
|
||||
@ -362,6 +365,7 @@ void set_menu_numopts(int, int);
|
||||
|
||||
/* Machine dependent functions .... */
|
||||
void md_init(void);
|
||||
void md_prelim_menu(void);
|
||||
void md_init_set_status(int); /* SFLAG_foo */
|
||||
|
||||
/* MD functions if user selects install - in order called */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.66 2012/06/23 17:49:58 martin Exp $ */
|
||||
/* $NetBSD: main.c,v 1.67 2013/03/19 22:16:53 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -58,6 +58,7 @@ __dead static void miscsighandler(int);
|
||||
static void ttysighandler(int);
|
||||
static void cleanup(void);
|
||||
static void process_f_flag(char *);
|
||||
static void prelim_menu(void);
|
||||
|
||||
static int exit_cleanly = 0; /* Did we finish nicely? */
|
||||
FILE *logfp; /* log file */
|
||||
@ -137,6 +138,18 @@ init(void)
|
||||
pkg.xfer_type = pkgsrc.xfer_type = "http";
|
||||
}
|
||||
|
||||
#ifdef __weak_reference
|
||||
__weakref_visible void prelim_menu(void)
|
||||
__weak_reference(md_prelim_menu);
|
||||
#endif
|
||||
#if 0
|
||||
static void
|
||||
prelim_menu(void)
|
||||
{
|
||||
/* do nothing, weak reference stub for md_prelim_menu */
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
@ -217,6 +230,12 @@ main(int argc, char **argv)
|
||||
select_language();
|
||||
get_kb_encoding();
|
||||
|
||||
#ifdef __weak_reference
|
||||
/* if md wants to ask anything before we start, do it now */
|
||||
if (prelim_menu != 0)
|
||||
prelim_menu();
|
||||
#endif
|
||||
|
||||
/* Menu processing */
|
||||
process_menu(MENU_netbsd, NULL);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: menus.mi,v 1.47 2012/07/06 21:10:56 jdf Exp $ */
|
||||
/* $NetBSD: menus.mi,v 1.48 2013/03/19 22:16:53 garbled Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@ -462,3 +462,8 @@ menu pkgsrc, y=-4, x=0, w=70, no box, no clear,
|
||||
action {process_menu(MENU_yesno, deconst(MSG_delete_xfer_file));
|
||||
clean_xfer_dir = yesno; };
|
||||
option MSG_quit_pkgsrc, exit, action { yesno = 0;};
|
||||
|
||||
menu usersh, title MSG_User_shell, no clear;
|
||||
option "/bin/sh", exit, action { ushell = "/bin/sh";};
|
||||
option "/bin/ksh", exit, action { ushell = "/bin/ksh";};
|
||||
option "/bin/csh", exit, action { ushell = "/bin/csh";};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msg.mi.de,v 1.72 2013/03/16 17:10:16 christos Exp $ */
|
||||
/* $NetBSD: msg.mi.de,v 1.73 2013/03/19 22:16:53 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -1020,6 +1020,7 @@ message other {andere }
|
||||
message Perform_IPv6_autoconfiguration {IPv6 automatisch konfigurieren?}
|
||||
message Perform_DHCP_autoconfiguration {Konfiguration per DHCP ermitteln?}
|
||||
message Root_shell {Root-Shell}
|
||||
message User_shell {User-Shell}
|
||||
|
||||
.if AOUT2ELF
|
||||
message aoutfail
|
||||
@ -1087,6 +1088,7 @@ message enable_sshd {sshd aktivieren}
|
||||
message enable_ntpd {ntpd aktivieren}
|
||||
message run_ntpdate {ntpdate beim Starten ausführen}
|
||||
message enable_mdnsd {mdnsd aktivieren}
|
||||
message add_a_user {Add a user}
|
||||
message configmenu {Zusätzliche Einstellungen konfigurieren.}
|
||||
message doneconfig {Konfiguration abgeschlossen.}
|
||||
message Install_pkgin {pkgin installieren und Datenbank initialisieren}
|
||||
@ -1114,3 +1116,5 @@ message pkgin_failed
|
||||
{Die Installation von pkgin ist fehlgeschlagen, evtl. weil keine Binärpakete
|
||||
vorhanden sind. Bitte den Pfad der Pakete überprüfen und noch einmal versuchen.}
|
||||
message failed {Fehlgeschlagen}
|
||||
message addusername {8 character username to add:}
|
||||
message addusertowheel {Do you wish to add this user to group wheel?}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msg.mi.en,v 1.177 2013/03/16 17:10:16 christos Exp $ */
|
||||
/* $NetBSD: msg.mi.en,v 1.178 2013/03/19 22:16:54 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -960,6 +960,7 @@ message other {other }
|
||||
message Perform_IPv6_autoconfiguration {Perform IPv6 autoconfiguration?}
|
||||
message Perform_DHCP_autoconfiguration {Perform DHCP autoconfiguration?}
|
||||
message Root_shell {Root shell}
|
||||
message User_shell {User shell}
|
||||
|
||||
.if AOUT2ELF
|
||||
message aoutfail
|
||||
@ -1019,6 +1020,7 @@ message enable_sshd {Enable sshd}
|
||||
message enable_ntpd {Enable ntpd}
|
||||
message run_ntpdate {Run ntpdate at boot}
|
||||
message enable_mdnsd {Enable mdnsd}
|
||||
message add_a_user {Add a user}
|
||||
message configmenu {Configure the additional items as needed.}
|
||||
message doneconfig {Finished configuring}
|
||||
message Install_pkgin {Install pkgin and update package summary}
|
||||
@ -1044,3 +1046,5 @@ message pkgin_failed
|
||||
{Installation of pkgin failed, possibly because no binary packages
|
||||
exist. Please check the package path and try again.}
|
||||
message failed {Failed}
|
||||
message addusername {8 character username to add:}
|
||||
message addusertowheel {Do you wish to add this user to group wheel?}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msg.mi.es,v 1.49 2013/03/16 17:10:17 christos Exp $ */
|
||||
/* $NetBSD: msg.mi.es,v 1.50 2013/03/19 22:16:54 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -986,6 +986,7 @@ message other {otro }
|
||||
message Perform_IPv6_autoconfiguration {¿Realizar autoconfiguración IPv6?}
|
||||
message Perform_DHCP_autoconfiguration {¿Realizar autoconfiguración DHCP ?}
|
||||
message Root_shell {Shell de root}
|
||||
message User_shell {Shell de user}
|
||||
|
||||
.if AOUT2ELF
|
||||
message aoutfail
|
||||
@ -1063,6 +1064,7 @@ message enable_sshd {Activar sshd}
|
||||
message enable_ntpd {Activar ntpd}
|
||||
message run_ntpdate {Ejecutar ntpdate durante el arranque}
|
||||
message enable_mdnsd {Activar mdnsd}
|
||||
message add_a_user {Add a user}
|
||||
message configmenu {Configurar elementos adicionales bajo demanda.}
|
||||
message doneconfig {Terminar configuración}
|
||||
message Install_pkgin {Instalar pkgin y actualizar la lista de paquetes}
|
||||
@ -1094,3 +1096,5 @@ message pkgin_failed
|
||||
paquetes binarios. Por favor verifique el camino a los paquetes y
|
||||
reinténtelo de nuevo.}
|
||||
message failed {Error}
|
||||
message addusername {8 character username to add:}
|
||||
message addusertowheel {Do you wish to add this user to group wheel?}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msg.mi.fr,v 1.131 2013/03/16 17:10:17 christos Exp $ */
|
||||
/* $NetBSD: msg.mi.fr,v 1.132 2013/03/19 22:16:54 garbled Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -1058,6 +1058,7 @@ message other {autre }
|
||||
message Perform_IPv6_autoconfiguration {Configurer automatiquement l'IPv6 ?}
|
||||
message Perform_DHCP_autoconfiguration {Configurer automatiquement par DHCP ?}
|
||||
message Root_shell {Shell du compte "root"}
|
||||
message User_shell {Shell du compte "user"}
|
||||
|
||||
.if AOUT2ELF
|
||||
message aoutfail
|
||||
@ -1126,6 +1127,7 @@ message enable_sshd {Activer sshd}
|
||||
message enable_ntpd {Activer ntpd}
|
||||
message run_ntpdate {Executer ntpdate au démarrage}
|
||||
message enable_mdnsd {Activer mdnsd}
|
||||
message add_a_user {Add a user}
|
||||
message configmenu {Configurer les items suivants si nécéssaire.}
|
||||
message doneconfig {Configuration terminée}
|
||||
message Install_pkgin {Installer pkgin et mettre à jour le sommaire des paquetages}
|
||||
@ -1154,3 +1156,5 @@ message pkgin_failed
|
||||
{L'installation de pkgin a échoué, peut-être parce que son paquetage binaire
|
||||
n'existe pas. Vérifiez le chemin et essayez à nouveau.}
|
||||
message failed {Échoué}
|
||||
message addusername {8 character username to add:}
|
||||
message addusertowheel {Do you wish to add this user to group wheel?}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msg.mi.pl,v 1.88 2013/03/16 17:10:17 christos Exp $ */
|
||||
/* $NetBSD: msg.mi.pl,v 1.89 2013/03/19 22:16:54 garbled Exp $ */
|
||||
/* Based on english version: */
|
||||
/* NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat Exp */
|
||||
|
||||
@ -957,6 +957,7 @@ message other {inny }
|
||||
message Perform_IPv6_autoconfiguration {Wykonac autokonfiguracje IPv6?}
|
||||
message Perform_DHCP_autoconfiguration {Wykonac autkonfiguracje DHCP?}
|
||||
message Root_shell {Powloka root'a}
|
||||
message User_shell {Powloka user'a}
|
||||
|
||||
.if AOUT2ELF
|
||||
message aoutfail
|
||||
@ -1019,6 +1020,7 @@ message enable_sshd {Wlacz sshd}
|
||||
message enable_ntpd {Wlacz ntpd}
|
||||
message run_ntpdate {uruchom ntpdate podczas startu systemu}
|
||||
message enable_mdnsd {Wlacz mdnsd}
|
||||
message add_a_user {Add a user}
|
||||
message configmenu {Skonfiguruj dodatkowe elementy w razie potrzeby.}
|
||||
message doneconfig {Konfiguracja zakonczona}
|
||||
message Install_pkgin {Zainstaluj pkgin i uaktualnij podsumowanie pakietow}
|
||||
@ -1049,3 +1051,5 @@ message pkgin_failed
|
||||
pakietow binarnych.
|
||||
Sprawdz sciezke pakietow i sprobuj ponownie.}
|
||||
message failed {Nie powiodlo sie}
|
||||
message addusername {8 character username to add:}
|
||||
message addusertowheel {Do you wish to add this user to group wheel?}
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: MAKEDEV.conf,v 1.10 2013/03/08 12:33:25 jmcneill Exp $
|
||||
# $NetBSD: MAKEDEV.conf,v 1.11 2013/03/19 22:16:54 garbled Exp $
|
||||
|
||||
all_md)
|
||||
makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3
|
||||
@ -24,5 +24,5 @@ ramdisk|floppy)
|
||||
makedev flash0 flash1 flash2 flash3 flash4 flash5 flash6 flash7
|
||||
makedev tty0 tty1 opty
|
||||
makedev st0 st1 cd0 cd1
|
||||
makedev drvctl
|
||||
makedev drvctl random
|
||||
;;
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile.inc,v 1.48 2013/03/17 12:19:57 mlelstv Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.49 2013/03/19 22:16:54 garbled Exp $
|
||||
#
|
||||
# etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
|
||||
#
|
||||
@ -20,6 +20,7 @@ EVBARM_BOARDS+= ADI_BRH CP3100 GEMINI GUMSTIX INTEGRATOR \
|
||||
IMAGE.rel= ${RELEASEDIR}/${RELEASEMACHINEDIR}
|
||||
IMAGE.dir= ${IMAGE.rel}/binary/gzimg
|
||||
IMAGE.kern= ${IMAGE.rel}/binary/kernel
|
||||
IMAGE.instk= ${IMAGE.rel}/installation/instkernel
|
||||
|
||||
__mkimage: .USE
|
||||
TOOL_MAKEFS=${TOOL_MAKEFS} \
|
||||
@ -30,7 +31,7 @@ __mkimage: .USE
|
||||
TOOL_MTREE=${TOOL_MTREE} \
|
||||
HOST_SH=${HOST_SH} \
|
||||
${HOST_SH} ${MKIMAGE} -x -h ${.TARGET:S/smp_//} -D ${DESTDIR} \
|
||||
-K ${.ALLSRC} -S ${NETBSDSRCDIR} \
|
||||
-K ${.ALLSRC} -S ${NETBSDSRCDIR} ${MKI_OPTS.${.TARGET}} \
|
||||
${IMAGE.dir}/${.TARGET:S/smp_//}.img.gz
|
||||
|
||||
.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "earm" \
|
||||
@ -64,10 +65,13 @@ KERNEL_SETS+= HDL_G INTEGRATOR_CP IXM1200
|
||||
|
||||
.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "earm" \
|
||||
|| ${MACHINE_ARCH} == "earmhf"
|
||||
EXTRA_KERNELS+= RPI
|
||||
BUILD_KERNELS+= RPI_INSTALL
|
||||
KERNEL_SETS+= RPI
|
||||
smp_rpi: ${IMAGE.kern}/netbsd-RPI.bin.gz __mkimage
|
||||
MKI_OPTS.smp_rpi_inst="-b"
|
||||
smp_rpi_inst: ${IMAGE.instk}/netbsd-RPI_INSTALL.bin.gz __mkimage
|
||||
.if empty(ALL_KERNELS) || !empty(ALL_KERNELS:MRPI)
|
||||
SNAP_MD_POST_DEPS+= smp_rpi
|
||||
SNAP_MD_POST_DEPS+= smp_rpi smp_rpi_inst
|
||||
.endif
|
||||
.endif
|
||||
|
||||
|
@ -1,10 +1,18 @@
|
||||
# $NetBSD: Makefile.evbarm.inc,v 1.22 2012/02/16 08:08:25 matt Exp $
|
||||
# $NetBSD: Makefile.evbarm.inc,v 1.23 2013/03/19 22:16:54 garbled Exp $
|
||||
|
||||
#
|
||||
# If this is a install kernel and the ramdisk image exists in the object
|
||||
# tree, insert it into the kernel *before* we make the u-boot images.
|
||||
#
|
||||
.if ${KERNEL_BUILD:T:M*INSTALL} != ""
|
||||
.if ${KERNEL_BUILD:T:MRPI_INSTALL} != ""
|
||||
RAMDISKDIR!= cd ${NETBSDSRCDIR}/distrib/${THISARM:T}/instkernel/sshramdisk && ${PRINTOBJDIR}
|
||||
|
||||
.if exists(${RAMDISKDIR}/sshramdisk.fs)
|
||||
SYSTEM_LD_TAIL_EXTRA+=; \
|
||||
echo ${TOOL_MDSETIMAGE} -s $@ ${RAMDISKDIR}/sshramdisk.fs; \
|
||||
${TOOL_MDSETIMAGE} -s $@ ${RAMDISKDIR}/sshramdisk.fs
|
||||
.endif
|
||||
.elif ${KERNEL_BUILD:T:M*INSTALL} != ""
|
||||
RAMDISKDIR!= cd ${NETBSDSRCDIR}/distrib/${THISARM:T}/instkernel/ramdisk && ${PRINTOBJDIR}
|
||||
|
||||
.if exists(${RAMDISKDIR}/ramdisk.fs)
|
||||
|
14
sys/arch/evbarm/conf/RPI_INSTALL
Normal file
14
sys/arch/evbarm/conf/RPI_INSTALL
Normal file
@ -0,0 +1,14 @@
|
||||
# $NetBSD: RPI_INSTALL,v 1.1 2013/03/19 22:16:54 garbled Exp $
|
||||
#
|
||||
# RPI_INSTALL -- RPI kernel with installation-sized
|
||||
# ramdisk
|
||||
#
|
||||
|
||||
include "arch/evbarm/conf/RPI"
|
||||
|
||||
options MEMORY_DISK_HOOKS
|
||||
options MEMORY_DISK_IS_ROOT # Force root on ramdisk
|
||||
options MEMORY_DISK_ROOT_SIZE=7300
|
||||
options MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode
|
||||
|
||||
options BOOTHOWTO=RB_SINGLE
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rpi_machdep.c,v 1.34 2013/02/04 21:46:14 skrll Exp $ */
|
||||
/* $NetBSD: rpi_machdep.c,v 1.35 2013/03/19 22:16:55 garbled Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.34 2013/02/04 21:46:14 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.35 2013/03/19 22:16:55 garbled Exp $");
|
||||
|
||||
#include "opt_evbarm_boardtype.h"
|
||||
|
||||
@ -45,6 +45,7 @@ __KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.34 2013/02/04 21:46:14 skrll Exp $
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
#include <sys/termios.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/bus.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user