Skip to content

Commit

Permalink
Fix simpleimage producing empty BOOT
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed May 2, 2017
1 parent a1c6db6 commit e405a18
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions simpleimage/make_simpleimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ cleanup() {
}
trap cleanup EXIT

if [ -n "$kernel_tarball" -a "$kernel_tarball" != "-" ]; then
echo "Using Kernel from $kernel_tarball ..."
tar -C $temp -xJf "$kernel_tarball"
kernel=$temp/boot
mv $temp/boot/uEnv.txt.in $temp/boot/uEnv.txt
fi

boot0_position=8 # KiB
uboot_position=19096 # KiB
part_position=20480 # KiB
Expand All @@ -90,7 +83,12 @@ dd if=/dev/zero bs=1M count=${boot_size} of=${out}1
mkfs.vfat -n BOOT ${out}1

# Add boot support if there
if [ -e "${kernel}/pine64/Image" -a -e "${kernel}/pine64/sun50i-a64-pine64-plus.dtb" ]; then
if [ -n "$kernel_tarball" ]; then
echo "Using Kernel from $kernel_tarball ..."
tar -C $temp -xJf "$kernel_tarball"
mv $temp/boot/uEnv.txt.in $temp/boot/uEnv.txt
mcopy -sm -i ${out}1 ${temp}/boot/* ::
elif [ -e "${kernel}/pine64/Image" -a -e "${kernel}/pine64/sun50i-a64-pine64-plus.dtb" ]; then
mcopy -sm -i ${out}1 ${kernel}/pine64 ::
mcopy -m -i ${out}1 ${kernel}/initrd.img :: || true
mcopy -m -i ${out}1 ${kernel}/uEnv.txt :: || true
Expand Down

0 comments on commit e405a18

Please sign in to comment.