old-MTGos/do.sh

26 lines
788 B
Bash
Raw Normal View History

#!/usr/bin/env bash
gmake clean
gmake loader.bin
gmake -C kernel
2016-08-09 14:18:58 +00:00
gmake clean
2016-08-08 17:41:56 +00:00
gmake -C modules
2016-08-09 14:18:58 +00:00
gmake clean
gmake -C modules subvar=11
mv kernel/mtgos.elf .
objcopy -O binary mtgos.elf mtgos.bin
gmake -C kernel subvar=11
objcopy -O binary kernel/mtgos.elf kernel/mtgos.bin
2016-08-05 20:03:14 +00:00
firmlink -O 08000000 -O 1FF80000 -E $(nm mtgos.elf | egrep ' _start$' | awk '{print $1}') -e $(nm kernel/mtgos.elf | egrep ' _start$' | awk '{print $1}') -o mtgos.firm mtgos.bin kernel/mtgos.bin
for f in *.elf; do
strip --strip-debug $f
done
rm mtgos.bin kernel/mtgos.*
sudo mount_msdosfs /dev/da3s1 mount
sudo rm mount/{arm9loaderhax.bin,mtgos.firm}
sudo mv loader.bin mount/arm9loaderhax.bin
sudo mv mtgos.firm mount/mtgos.firm
2016-08-08 17:41:56 +00:00
sudo mv *.elf mount
2016-08-09 14:18:58 +00:00
sudo mv *.neun mount
sudo umount mount
echo "Remove SD card!"