#! /bin/sh
#
# Customize a nanoBSD flash image for Soekris NET4801
#
# Copyright (c) 2004 Poul-Henning Kamp
#
# See /usr/share/examples/etc/bsd-style-copyright for license terms.
#
# $FreeBSD: stable/5/tools/tools/nanobsd/Customize/NET4801 142775 2005-02-28 10:01:45Z phk $
# 
# Usage:
#
# ${CUSTOMIZE} ${WD} ${WORLDDIR} ${.CURDIR} [ ${LOCAL_FILES_LIST} ]


WD=$1
WORLDDIR=$2
CURDIR=$3
LOCAL_FILES_LIST=$4

# Older NET4801s do not have the necessary wires on the PCB to run DMA
# mode against the CF card.  Disable ata_dma so we can boot.

touch ${WD}/boot/loader.conf
sed -i "" -e '/hw.ata.ata_dma/d' ${WD}/boot/loader.conf
echo 'hw.ata.ata_dma="0"' >> ${WD}/boot/loader.conf

