Createimg now creates a working 1G partition
This commit is contained in:
parent
b0824a051b
commit
39b9430cf8
3 changed files with 25 additions and 8 deletions
22
createimg.sh
22
createimg.sh
|
@ -1,25 +1,31 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
rm iglunix.img
|
||||||
|
|
||||||
dd if=../tiny-linux-bootloader/disk of=iglunix.img
|
dd if=../tiny-linux-bootloader/disk of=iglunix.img
|
||||||
exit
|
|
||||||
TOTAL=`stat -c %s iglunix.img`
|
|
||||||
|
|
||||||
SECTOR=$(($TOTAL / 512))
|
FILE_SIZE=$(stat -c %s iglunix.img)
|
||||||
|
echo "FILE_SIZE=${FILE_SIZE}"
|
||||||
dd if=/dev/zero count=$((3145727 - $SECTOR)) >> iglunix.img
|
PARTITION_START=$(($FILE_SIZE / 512))
|
||||||
|
PARTITION_START=$(($PARTITION_START + 1))
|
||||||
|
echo "PARTITION_START=${PARTITION_START}"
|
||||||
|
|
||||||
|
#create room for a partition
|
||||||
|
ls -al iglunix.img -h
|
||||||
|
dd if=/dev/zero bs=1 count=0 seek=1G of=iglunix.img
|
||||||
|
ls -al iglunix.img -h
|
||||||
|
|
||||||
echo "o
|
echo "o
|
||||||
n
|
n
|
||||||
p
|
p
|
||||||
1
|
1
|
||||||
32256
|
${PARTITION_START}
|
||||||
|
|
||||||
a
|
|
||||||
1
|
|
||||||
w
|
w
|
||||||
" | fdisk iglunix.img
|
" | fdisk iglunix.img
|
||||||
|
|
||||||
|
exit
|
||||||
|
|
||||||
# losetup -o 32256 /dev/loop0 iglunix.img
|
# losetup -o 32256 /dev/loop0 iglunix.img
|
||||||
# mkfs.vfat /dev/loop0
|
# mkfs.vfat /dev/loop0
|
||||||
# mount /dev/loop0 ./isoroot
|
# mount /dev/loop0 ./isoroot
|
||||||
|
|
10
pkgs/tiny-linux-bootloader/bsect.patch
Normal file
10
pkgs/tiny-linux-bootloader/bsect.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- bsect.asm
|
||||||
|
+++ bsect.asm
|
||||||
|
@@ -15,7 +15,6 @@
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
-%define DEBUG
|
||||||
|
%include "config.inc"
|
||||||
|
|
||||||
|
[BITS 16]
|
|
@ -6,6 +6,7 @@ fetch() {
|
||||||
tar -xf $pkgname-$pkgver.tar.xz
|
tar -xf $pkgname-$pkgver.tar.xz
|
||||||
cd $pkgname-$pkgver
|
cd $pkgname-$pkgver
|
||||||
patch -p1 < ../../build.patch
|
patch -p1 < ../../build.patch
|
||||||
|
patch -p1 < ../../bsect.patch
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
|
Loading…
Reference in a new issue