2016-08-05 13:15:47 +00:00
|
|
|
#!/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
|
2016-08-05 13:15:47 +00:00
|
|
|
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
|
2016-08-09 13:23:49 +00:00
|
|
|
for f in *.elf; do
|
|
|
|
strip --strip-debug $f
|
|
|
|
done
|
2016-08-05 13:15:47 +00:00
|
|
|
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
|
2016-08-05 13:15:47 +00:00
|
|
|
sudo umount mount
|
|
|
|
echo "Remove SD card!"
|