commit 51480070306ba4658f8d95ac15fba8d6eaf228fb
parent fe011f162e00c6ad0dd698befb8b3a3ef45fc37b
Author: parazyd <parazyd@dyne.org>
Date: Sat, 16 Apr 2016 00:08:35 +0200
small fixes
Diffstat:
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/arm/common b/arm/common
@@ -263,8 +263,7 @@ ${device_name}-prepimg() {
cgpt create ${image_name}.img
cgpt add -i 1 -t kernel -b 8192 -s 32768 -l kernel -S 1 -T 5 -P 10 ${image_name}.img
cgpt add -i 2 -t data -b 40960 -s `expr $(cgpt show ${image_name}.img \
- | grep 'Sec GPT table' \
- | awk '{print \$1}') - 40960` -l Root ${image_name}.img
+ | awk '/Sec GPT table/ {print \$1}') - 40960` -l Root ${image_name}.img
loopdevice=`sudo losetup -f --show ${workdir}/${image_name}.img`
mappdevice=`sudo kpartx -va $loopdevice | sed -E 's/.*(loop[0-9])p.*/\1/g' | head -1`
@@ -283,7 +282,6 @@ ${device_name}-prepimg() {
mkdir -p ${workdir}/root
sudo mount $rootpart ${workdir}/root && notice "Mounted root part"
- for i in $custmodules; do print $i | sudo tee -a ${strapdir}/etc/modules ; done
else
parted ${image_name}.img --script -- mklabel msdos
parted ${image_name}.img --script -- mkpart primary ${parted_boot}
@@ -308,10 +306,10 @@ ${device_name}-prepimg() {
sudo mount $bootpart ${workdir}/bootp && notice "Mounted boot part"
sudo mount $rootpart ${workdir}/root && notice "Mounted root part"
- print ${inittab} | sudo tee -a ${strapdir}/etc/inittab
- for i in $custmodules; do print $i | sudo tee -a ${strapdir}/etc/modules ; done
fi
+ print ${inittab} | sudo tee -a ${strapdir}/etc/inittab
+ for i in $custmodules; do print $i | sudo tee -a ${strapdir}/etc/modules ; done
notice "Finalized preparing image"
notice "Next step is ${device_name}-build-kernel"
}