Buffalo WHR-G54S
Buffalo WHR-G54S Tutorials
Buffalo WHR-G54S von einer SD-Card Booten.
mmc.o für den Buffalo
hier
# mount it
mount -t ext3 /dev/scsi/host0/bus0/target0/lun0/part1 /mnt
# now, we need to mount the root contents somewhere so we can copy
# them without copying /mnt and /proc to the new usb device
mkdir /tmp/root
# if you're using squashfs, you want to copy the squashfs contents,
# not the jffs2 symlinks, so use the command:
mount -o bind /rom /tmp/root
# if you're using jffs2 then use the command /
mount -o bind / /tmp/root
# now /tmp/root contains the root filesystem with no extra directories mounted
# so we just copy this to the usb device
cp /tmp/root/* /mnt -a
# and now we unmount both the usb and our /tmp/root
umount /tmp/root
umount /mnt
Init script /sbin/init:
#!/bin/sh
# SD-Card einbinden ROM
####################
# device der neuen Boot Partition
boot_dev="/dev/mmc/disc0/part1"
# gpio´s initialisieren
echo "0x00" > /proc/sys/diag
sleep 5
# module für mmc/sd dem ext2 filesystem
for module in mmc ext2; do {
insmod $module
sleep 2
}; done
# sd/mmc mounten
mount "$boot_dev" /mnt
sleep 2
# wenn die neue Boot-Partition erfolgreich gemountet wurde -> pivot root
# busybox pivot_root /mnt /mnt/mnt bedeutet: mach aus /mnt / und aus / /mnt
[ -x /mnt/sbin/init ] && {
mount -o move /proc /mnt/proc && \
busybox pivot_root /mnt /mnt/mnt && {
mount -o move /mnt/dev /dev
mount -o move /mnt/tmp /tmp
mount -o move /mnt/rom/jffs /jffs 2>&-
mount -o move /mnt/rom /rom 2>&-
}
}
# zum schluss INIT ausführen von der sd/mmc card.
exec /bin/busybox init