1 1.22 ast # $NetBSD: rpi.conf,v 1.22 2013/09/14 12:51:27 ast Exp $ 2 1.11 jakllsch # Raspberry Pi customization script used by mkimage 3 1.1 christos # 4 1.9 christos 5 1.9 christos board=rpi 6 1.16 christos kernel=$src/sys/arch/evbarm/compile/RPI/netbsd-RPI.bin 7 1.9 christos 8 1.22 ast GZIP_CMD=${TOOL_GZIP:-gzip} # ${GZIP} is special to gzip(1) 9 1.22 ast 10 1.9 christos . ${DIR}/conf/evbarm.conf 11 1.1 christos 12 1.1 christos firmwaredir=$src/external/broadcom/rpi-firmware/dist 13 1.1 christos firmwarefiles="LICENCE.broadcom bootcode.bin fixup.dat fixup_cd.dat start.elf start_cd.elf" 14 1.1 christos 15 1.1 christos make_filesystems() { 16 1.9 christos make_filesystems_evbarm 17 1.1 christos } 18 1.1 christos 19 1.1 christos make_fstab() { 20 1.9 christos make_fstab_evbarm 21 1.1 christos } 22 1.1 christos 23 1.13 christos make_label() { 24 1.13 christos make_label_evbarm 25 1.13 christos } 26 1.13 christos 27 1.1 christos customize() { 28 1.9 christos customize_evbarm 29 1.13 christos cat >> ${mnt}/etc/rc.conf << EOF 30 1.1 christos wscons=YES 31 1.20 jmcneill devpubd=YES 32 1.1 christos EOF 33 1.1 christos 34 1.13 christos } 35 1.13 christos 36 1.13 christos populate() { 37 1.13 christos cat > ${mnt}/boot/cmdline.txt << EOF 38 1.21 jmcneill root=ld0a 39 1.10 skrll #fb=1280x1024 # to select a mode, otherwise try EDID 40 1.1 christos #fb=disable # to disable fb completely 41 1.1 christos EOF 42 1.14 christos if [ ! -f ${kernel} ]; then 43 1.14 christos echo ${PROG}: Missing ${kernel} 1>&2 44 1.10 skrll exit 1 45 1.10 skrll fi 46 1.10 skrll 47 1.10 skrll echo "${bar} installing kernel ${bar}" 48 1.16 christos case ${kernel} in 49 1.16 christos *.gz) 50 1.19 riz gzip -dc ${kernel} > ${mnt}/boot/kernel.img 51 1.16 christos ;; 52 1.16 christos *) 53 1.16 christos cp ${kernel} ${mnt}/boot/kernel.img 54 1.16 christos ;; 55 1.16 christos esac 56 1.10 skrll 57 1.17 jmcneill echo "${bar} installing firmware files ${bar}" 58 1.1 christos (cd ${mnt}/boot && 59 1.1 christos for f in ${firmwarefiles}; do 60 1.17 jmcneill echo " $f" 61 1.13 christos cp ${firmwaredir}/${f} . 62 1.1 christos done 63 1.1 christos ) 64 1.1 christos 65 1.1 christos } 66