#!/bin/sh -e # Get machine params from the original firmware cd ./bundle-tools && ./extract_head.pl ../orig.wye [ -e fwcs ] || make && cd ../ cp ./bundle-tools/fwpack ./bin/ # Copy the BIOS [ -d ./temp ] || mkdir ./temp && cd temp && ../bundle-tools/fwextract ../orig.wye extract if ! [ -e ???_code ]; then echo 'Could not find a suitable BIOS file! (It should be called ..._code, where ...' echo 'can be, for example, mid or leo.)' exit 1 fi cp ???_code ../fwbase/ && cd .. rm ./temp -R # Create new firmware image cd ./bundle-tools && make clean && cd .. cd ./make-nk && make && cp boot make-nk ../bin/ && rm boot make-nk boot.o cd .. ## Not calling the initrd builder script here because we already ship with ## a quick and minimal initrd (and this way we probably don't need root ## permissions at all). cp initrd.img.orig initrd.img cd bootsplash && [ -e splash ] || make splash && ./splash -s -f Matrix/config/bootsplash-1024x768.cfg >> ../initrd.img cd .. && cp bin/boot ./ bin/make-nk -k bzImage -i initrd.img -vm 28672 bin/fwpack linux.img fwbase/???_code nk.bin fwbase/poweron.bmp # Cleanup rm boot mv linux.img ../ rm nk.bin