-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ | |
/tmp/ | ||
/sunxi-tools/ | ||
/bootloaders/ | ||
/*.img | ||
/*.img.xz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
tmp/u-boot/%/boot.scr: blobs/%.cmd | ||
mkdir -p $$(dirname $@) | ||
mkimage -C none -A arm -T script -d $< $@ | ||
|
||
tmp/u-boot/%/boot.img: tmp/u-boot/%/boot.scr | ||
dd if=/dev/zero of=$@ bs=1M count=2 | ||
mkfs.vfat -n "u-boot-script" $@ | ||
mcopy -sm -i $@ $< :: | ||
|
||
u-boot-sopine-%.img: tmp/u-boot-sopine_baseboard/u-boot-with-spl.bin tmp/u-boot/%/boot.img | ||
rm -f $@.tmp | ||
dd if=$(word 2,$^) of=$@.tmp seek=8192 conv=notrunc status=none | ||
parted -s $@.tmp mklabel msdos | ||
parted -s $@.tmp unit s mkpart primary fat16 8192 100% | ||
parted -s $@.tmp set 1 boot on | ||
dd if=$(word 1,$^) of=$@.tmp seek=16 conv=notrunc status=none | ||
mv "$@.tmp" $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# erase flash | ||
sf probe | ||
|
||
echo erasing flash... | ||
sf erase 0 3e8000 | ||
|
||
echo done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# first read existing loader | ||
sf probe | ||
|
||
echo reading flash... | ||
${devtype} read ${kernel_addr_r} 10 1f40; | ||
|
||
# erase flash | ||
echo erasing flash... | ||
sf erase 0 3e8000 | ||
|
||
# write flash | ||
echo writing flash... | ||
sf write ${kernel_addr_r} 0 3e8000 | ||
|
||
echo done |