[prev in list] [next in list] [prev in thread] [next in thread]
List: ipcop-svn
Subject: [Ipcop-svn] SF.net SVN: ipcop: [1150] ipcop/trunk
From: owes () users ! sourceforge ! net
Date: 2008-02-27 18:14:48
Message-ID: E1JUQno-0004Ah-VZ () sc8-pr-svn4 ! sourceforge ! net
[Download RAW message or body]
Revision: 1150
http://ipcop.svn.sourceforge.net/ipcop/?rev=1150&view=rev
Author: owes
Date: 2008-02-27 10:14:48 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
Use syslinux MBR when building USB hdd and USB zip.
sfdisk still generates an error but things seem to work OK?
Keep lfs/as86 and lfs/mbr until sure things are working.
Remember to put SKIP_USB_IMAGES in .config if you want to generate USB images.
Modified Paths:
--------------
ipcop/trunk/lfs/usb-key
ipcop/trunk/make.sh
Modified: ipcop/trunk/lfs/usb-key
===================================================================
--- ipcop/trunk/lfs/usb-key 2008-02-27 18:10:01 UTC (rev 1149)
+++ ipcop/trunk/lfs/usb-key 2008-02-27 18:14:48 UTC (rev 1150)
@@ -68,6 +68,7 @@
break; \
fi; \
done; \
+ mkdir -p /installer/mnt && \
losetup $$LOOPDEV $$IMAGE && \
mount -t vfat $$LOOPDEV /installer/mnt && \
cp -R /installer/cdrom/* /installer/mnt && \
@@ -80,7 +81,22 @@
endef
+define MBR_TO_IMG
+ for i in `seq 0 7`; do \
+ if (! losetup /dev/loop$${i} >/dev/null 2>&1 ); then \
+ LOOPDEV="/dev/loop$${i}"; \
+ break; \
+ fi; \
+ done; \
+ mkdir -p /installer/mnt && \
+ losetup $$LOOPDEV $$IMAGE && \
+ cat /usr/lib/syslinux/mbr.bin > $$LOOPDEV && \
+ losetup -d $$LOOPDEV
+
+endef
+
$(TARGET) : $(firstword $(MAKEFILE_LIST)) $(patsubst %,$(DIR_DL)/%,$(objects))
+ @$(PREBUILD)
for i in `seq 0 7`; do \
if [ ! -b /dev/loop$${i} ]; then \
@@ -100,15 +116,15 @@
# on the unique partition. Image will be compressed later
dd bs=1k if=/dev/zero of=$(IMGfs) count=63000
IMAGE=$(IMGfs); $(COPY_TO_IMG)
-
+
# usb-hdd (64 heads, 32 sectors geometry, on a partition 1)
# use 64 heads as 256 does not work on Award bios (Asus A7V8X-X Gilles)
# use 32 sectors a minima or device is not recognised as hard disk (Frank)
# add 32 to IMGfs as first partition start at 32
COUNT=$$((`du -k -s $(IMGfs) | awk '{print $$1}'` + 32 )); \
dd bs=1k if=/dev/zero of=$(IMGhdd) count=$$COUNT
- # write mbr before partitioning save a 'not msdos fs' warning from sfdisk
- /usr/local/sbin/install-mbr -f $(IMGhdd)
+ # MBR is written but sfdisk still warns with a 'msdos signature missing'
+ IMAGE=$(IMGhdd); $(MBR_TO_IMG)
echo -e "0,,6,*\n;\n;\n;" | sfdisk -qLD -H 64 -S 32 $(IMGhdd)
# copy the entire partition, make the fs and dd back
dd if=$(IMGfs) of=$(IMGhdd) bs=512 seek=32
@@ -116,7 +132,8 @@
#usb-zip (64 heads, 32 sectors geometry, on a partition 4)
COUNT=$$((`du -k -s $(IMGfs) | awk '{print $$1}'` + 32 )); \
dd bs=1k if=/dev/zero of=$(IMGzip) count=$$COUNT
- /usr/local/sbin/install-mbr -f $(IMGzip)
+ # MBR is written but sfdisk still warns with a 'msdos signature missing'
+ IMAGE=$(IMGzip); $(MBR_TO_IMG)
echo -e "0,0\n 0,0\n 0,0\n,,6,*" | sfdisk -qLD -H 64 -S 32 $(IMGzip)
# copy the entire file system
dd if=$(IMGfs) of=$(IMGzip) bs=512 seek=32
@@ -127,3 +144,6 @@
for i in `seq 0 7`; do \
rm -fr /dev/loop$${i}; \
done
+
+
+ # yes we want it rebuild at each time, so no POSTBUILD
Modified: ipcop/trunk/make.sh
===================================================================
--- ipcop/trunk/make.sh 2008-02-27 18:10:01 UTC (rev 1149)
+++ ipcop/trunk/make.sh 2008-02-27 18:14:48 UTC (rev 1150)
@@ -1874,11 +1874,11 @@
chroot_make pxe
if [ x"${SKIP_USB_IMAGES}" != x"yes" ]; then
- chroot_make as86
- chroot_make mbr
+ #chroot_make as86
+ #chroot_make mbr
chroot_make usb-key
else
- echo "Temporary skip usb images to save time"
+ echo "Skip usb images to save time"
fi
chroot_make packages_list PASS=2
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic