Commit 0a6624b2 authored by Serge Schneider's avatar Serge Schneider
Browse files

Update ROOT_MARGIN

parent 24bb01de
...@@ -6,7 +6,7 @@ RUN apt-get -y update && \ ...@@ -6,7 +6,7 @@ RUN apt-get -y update && \
apt-get -y install \ apt-get -y install \
git vim parted \ git vim parted \
quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \ quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \
bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file kmod\ bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file kmod bc\
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY . /pi-gen/ COPY . /pi-gen/
......
...@@ -14,7 +14,7 @@ To install the required dependencies for pi-gen you should run: ...@@ -14,7 +14,7 @@ To install the required dependencies for pi-gen you should run:
```bash ```bash
apt-get install coreutils quilt parted qemu-user-static debootstrap zerofree zip \ apt-get install coreutils quilt parted qemu-user-static debootstrap zerofree zip \
dosfstools bsdtar libcap2-bin grep rsync xz-utils file git curl dosfstools bsdtar libcap2-bin grep rsync xz-utils file git curl bc
``` ```
The file `depends` contains a list of tools needed. The format of this The file `depends` contains a list of tools needed. The format of this
......
...@@ -16,3 +16,4 @@ xxd ...@@ -16,3 +16,4 @@ xxd
file file
git git
lsmod:kmod lsmod:kmod
bc
...@@ -18,7 +18,7 @@ ALIGN="$((4 * 1024 * 1024))" ...@@ -18,7 +18,7 @@ ALIGN="$((4 * 1024 * 1024))"
# some overhead (since actual space usage is usually rounded up to the # some overhead (since actual space usage is usually rounded up to the
# filesystem block size) and gives some free space on the resulting # filesystem block size) and gives some free space on the resulting
# image. # image.
ROOT_MARGIN=$((800*1024*1024)) ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.2 + 200 * 1024 * 1024) / 1" | bc)"
BOOT_PART_START=$((ALIGN)) BOOT_PART_START=$((ALIGN))
BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN)) BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment