Resflash: Difference between revisions
Jump to navigation
Jump to search
(Created page with "notes for building [https://stable.rcesoftware.com/resflash/ resflash] for octeon ([https://www.ui.com/edgemax/edgerouter-lite/ edgerouter lite]). Octeon requires a custom bui...") |
No edit summary |
||
Line 7: | Line 7: | ||
Here's the build instructions: | Here's the build instructions: | ||
#!/bin/ksh | #!/bin/ksh | ||
export DESTDIR=/usr/dest RELEASEDIR=/usr/release MACHINE='octeon' NCPU=1 MYKERNEL=GENERIC DATEARG='+%H:%M:%S' part=d | export DESTDIR=/usr/dest RELEASEDIR=/usr/release MACHINE='octeon' NCPU=1 MYKERNEL=GENERIC DATEARG='+%H:%M:%S' part=d | ||
mkdir ${RELEASEDIR} | mkdir ${RELEASEDIR} |
Revision as of 18:48, 20 February 2019
notes for building resflash for octeon (edgerouter lite). Octeon requires a custom built kernel because the root filesystem is on a different partition.
If you want to avoid cross compiling (I did), first do a basic install of openbsd per here. Be sure to include the comp set. Then mount /usr/src on external storage (to avoid unnecessary compire related iops to usb) nfs or iscsi or whatever you prefer. Then run below script to create the kernel:
Here's the build instructions:
#!/bin/ksh export DESTDIR=/usr/dest RELEASEDIR=/usr/release MACHINE='octeon' NCPU=1 MYKERNEL=GENERIC DATEARG='+%H:%M:%S' part=d mkdir ${RELEASEDIR} chown build:wobj ${RELEASEDIR} echo "$(date "${DATEARG}") ${0}: ----- Building bsd.${part} -----" cd /usr/src/sys/arch/${MACHINE}/conf sed "/^config.*bsd/s/config.*/config bsd root on sd0${part} swap on sd0b/" \ GENERIC > GENERIC.${part} sed "/^include.*GENERIC/s/GENERIC/GENERIC.${part}/" GENERIC.MP > \ GENERIC.MP.${part} config ${MYKERNEL}.${part} rm GENERIC.${part} GENERIC.MP.${part} cd ../compile/${MYKERNEL}.${part} make -j ${NCPU} cp obj/bsd ${RELEASEDIR}/bsd.${part} cd .. rm -rf ${MYKERNEL}.${part} rm -rf /usr/obj/sys/arch/${MACHINE}/compile/${MYKERNEL}.${part} cd ${RELEASEDIR} cksum -a sha256 -b bsd.d >> SHA256.bsd.d
Get the kernel from /usr/release, combine it with the distribution octeon sets from the matching release and you should be able to run build_resflash.sh and create a working image for resflash.