File tree Expand file tree Collapse file tree 6 files changed +51
-1
lines changed Expand file tree Collapse file tree 6 files changed +51
-1
lines changed Original file line number Diff line number Diff line change 44/tmp /
55/sunxi-tools /
66/bootloaders /
7+ /* .img
8+ /* .img.xz
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ include Makefile.atf.mk
88include Makefile.uboot.mk
99include Makefile.tools.mk
1010include Makefile.sopine.mk
11+ include Makefile.blobs.mk
1112
1213bootloaders :
1314 mkdir -p $@
@@ -21,4 +22,6 @@ bootloaders/sopine_baseboard-uboot.bin: tmp/u-boot-sopine_baseboard/u-boot-with-
2122.PHONY : image-bootloaders
2223image-bootloaders : \
2324 bootloaders/pine64_plus-uboot.bin \
24- bootloaders/sopine_baseboard-uboot.bin
25+ bootloaders/sopine_baseboard-uboot.bin \
26+ u-boot-sopine-flash-spi.img.xz \
27+ u-boot-sopine-erase-spi.img.xz \
Original file line number Diff line number Diff line change 1+ tmp/u-boot/% /boot.scr : blobs/% .cmd
2+ mkdir -p $$(dirname $@ )
3+ mkimage -C none -A arm -T script -d $< $@
4+
5+ tmp/u-boot/% /boot.img : tmp/u-boot/% /boot.scr
6+ dd if=/dev/zero of=$@ bs=1M count=2
7+ mkfs.vfat -n " u-boot-script" $@
8+ mcopy -sm -i $@ $< ::
9+
10+ u-boot-sopine-% .img : tmp/u-boot-sopine_baseboard/u-boot-with-spl.bin tmp/u-boot/% /boot.img
11+ rm -f $@ .tmp
12+ dd if=$(word 2,$^ ) of=$@ .tmp seek=8192 conv=notrunc status=none
13+ parted -s $@ .tmp mklabel msdos
14+ parted -s $@ .tmp unit s mkpart primary fat16 8192 100%
15+ parted -s $@ .tmp set 1 boot on
16+ dd if=$(word 1,$^ ) of=$@ .tmp seek=16 conv=notrunc status=none
17+ mv " $@ .tmp" $@
Original file line number Diff line number Diff line change @@ -3,3 +3,9 @@ sunxi-tools:
33
44sunxi-tools/sunxi-fel : sunxi-tools
55 make -C sunxi-tools
6+
7+ % .img.xz : % .img
8+ pxz -f -3 $<
9+
10+ clean :
11+ rm -rf tmp/ bootloaders/
Original file line number Diff line number Diff line change 1+ # erase flash
2+ sf probe
3+
4+ echo erasing flash...
5+ sf erase 0 3e8000
6+
7+ echo done
Original file line number Diff line number Diff line change 1+ # first read existing loader
2+ sf probe
3+
4+ echo reading flash...
5+ ${devtype} read ${kernel_addr_r} 10 1f40;
6+
7+ # erase flash
8+ echo erasing flash...
9+ sf erase 0 3e8000
10+
11+ # write flash
12+ echo writing flash...
13+ sf write ${kernel_addr_r} 0 3e8000
14+
15+ echo done
You can’t perform that action at this time.
0 commit comments