nuttx/build_js_romfs.sh

8 lines
381 B
Bash

headerfile=js-root.h
romfsimg=js.img
genromfs -f $romfsimg -d js -V "NSHInitVol" || { echo "genromfs failed" ; exit 1 ; }
echo '#include <nuttx/compiler.h>' >${headerfile}
xxd -i $romfsimg | sed 's/^unsigned char/const unsigned char aligned_data(4)/g' >>${headerfile} || \
{ echo "ERROR: xxd of $< failed" ; rm -f $romfsimg; exit 1 ; }
cp $headerfile ../apps/interpreters/hello/