On Tue, 23 Apr 2002 13:26:26 +0100
"brooksp5" <[EMAIL PROTECTED]> wrote:

> Hello,
> I have been using both Dachstein and Bering for the last few months,
> I now want to start working with compact flash cards, can anyone point
> me in the right direction to start off.
> I am just looking for some general links to recomended cards and where
> to look for How-To's etc.

Pretty much any card will do, in my experience.  Here is a Makefile I
wrote for turning a bering floppy image into a compact flash image.  The
same basic steps should work for other dists.  I have commented out the
steps to make it a headless serial box, so don't let that confuse you if
you don't need it.  Put the Makefile and the .bin image in a scratch
directory.  Make a "bootmods" directory.  Put the ide-* modules in that
directory (we are going to copy them into the initrd.lrp file).  Modify
the Makefile to contain the right paths and filenames in the vars at the
top.  Type make.  It will destroy whatever is on the compact flash card,
so be careful.  It should now boot in any ide-cf machine.

Feel free to question,
Chad Carr

++++++++Makefile attached inline+++++++++

#
# Makefile to build new soekris image from bering floppy image
#   *****THIS WILL DESTROY WHATEVER IS ON YOUR CF CARD*****
#   Instructions:  put this Makefile and a bering floppy image in a "scratch"
#   directory.  Get the modules you want to load before packagesChange the following 
vars to reflect your system:
#       BERING_IMAGE - the name of the floppy image
#       CF_DEV - the device name or your compact flash drive
#       BERING_BOOT_MOD_DIR - relative path to modules needed for package load
#               (for soekris, serial, ide-mod, ide-probe-mod, ide-disk)
#       BERING_OTHER_MOD_DIR - relative path to other modules you want to load 
#               (for soekris, natsemi)
#

BERING_IMAGE=bering-1680-v1.0-rc2.bin
CF_DEV=/dev/hde1
BERING_BOOT_MOD_DIR=bootmods
BERING_OTHER_MOD_DIR=othermods

.DUMMY:
        bering

bering:
        # make mountpoint and mount floppy image
        mkdir -p mnt
        mount -t msdos $(BERING_IMAGE) mnt -o loop

        # make mountpoint, format fs and mount cf
        mkdir -p cf
        mkdosfs $(CF_DEV)
        mount -t msdos $(CF_DEV) cf

        # copy all the files from the floppy image to the cf
        cp mnt/* cf/

        # umount the filesystems
        umount mnt
        umount cf

        # run syslinux to make them bootable
        syslinux $(CF_DEV)

        # remount the cf so me can muck with it
        mount -t msdos $(CF_DEV) cf

        # get packages from hda1 and send messages to serial console
        sed -e 's/fd0u1680/hda1/g' cf/syslinux.cfg > cf/syslinux.tmp
        mv cf/syslinux.tmp cf/syslinux.cfg
#       echo append console=ttyS0,19200 >> cf/syslinux.cfg

        # modify etc.lrp to allow serial console login from root
#       mkdir -p scratch
#       tar xzf cf/etc.lrp -C scratch
#       sed -e 's/^\([12]:\)/#\1/g' \
##          -e 's/^#T1\(.*\)ttyS1/T0\1ttyS0/' scratch/etc/inittab \
#           > scratch/etc/inittab.tmp
#       mv scratch/etc/inittab.tmp scratch/etc/inittab
#       sed -e '/^tty[0-9]/d' scratch/etc/securetty > scratch/etc/securetty.tmp
#       echo ttyS0 >> scratch/etc/securetty.tmp
#       mv scratch/etc/securetty.tmp scratch/etc/securetty
#       tar czvf cf/etc.lrp -C scratch `ls scratch`

        # get boot modules into initrd.lrp
        gunzip -S .lrp cf/initrd.lrp
        mount -t minix cf/initrd mnt -o loop
        cp $(BERING_BOOT_MOD_DIR)/serial.o        mnt/boot/lib/modules
        cp $(BERING_BOOT_MOD_DIR)/ide-mod.o       mnt/boot/lib/modules
        cp $(BERING_BOOT_MOD_DIR)/ide-disk.o      mnt/boot/lib/modules
        cp $(BERING_BOOT_MOD_DIR)/ide-probe-mod.o mnt/boot/lib/modules
        echo serial        >> mnt/boot/etc/modules
        echo ide-mod       >> mnt/boot/etc/modules
        echo ide-disk      >> mnt/boot/etc/modules
        echo ide-probe-mod >> mnt/boot/etc/modules
        umount mnt
        gzip -S .lrp cf/initrd


        # unmount cf
        umount cf
        

_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user

Reply via email to