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