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
|
||||
|
||||
rm iglunix.img
|
||||
|
||||
dd if=../tiny-linux-bootloader/disk of=iglunix.img
|
||||
exit
|
||||
TOTAL=`stat -c %s iglunix.img`
|
||||
|
||||
SECTOR=$(($TOTAL / 512))
|
||||
|
||||
dd if=/dev/zero count=$((3145727 - $SECTOR)) >> iglunix.img
|
||||
FILE_SIZE=$(stat -c %s iglunix.img)
|
||||
echo "FILE_SIZE=${FILE_SIZE}"
|
||||
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
|
||||
n
|
||||
p
|
||||
1
|
||||
32256
|
||||
${PARTITION_START}
|
||||
|
||||
a
|
||||
1
|
||||
w
|
||||
" | fdisk iglunix.img
|
||||
|
||||
exit
|
||||
|
||||
# losetup -o 32256 /dev/loop0 iglunix.img
|
||||
# mkfs.vfat /dev/loop0
|
||||
# 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
|
||||
cd $pkgname-$pkgver
|
||||
patch -p1 < ../../build.patch
|
||||
patch -p1 < ../../bsect.patch
|
||||
}
|
||||
|
||||
package() {
|
||||
|
|
Loading…
Reference in a new issue