Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc and miniroot

> How about c) to extract the files from a binary package, which was  
> previously built? At least this would decouple building of binary 
> packages (probably on the target platform) and extracting them onto the 
> miniroot.

Crunched objects (*.cro) are not usual executables.  You can reuse *.o files.

From rules:

        cat/ ${OBJS}
                ${CC} ${LDFLAGS} -nostdlib -r -Wl,-dc -o ${.TARGET} ${OBJS}

And generated Makefile (e.g. ${OBJDIR}/rescue/

        cat.cro: cat/
                ${NM} -ng cat/ | \
                ${AWK} '/^ *U / { next }; /^[0-9a-fA-F]+ C/ { next }; / main$$/ 
{ print "main _crunched_cat_stub"; next }; { print $$3 " " $$3 
"$$$$from$$$$cat" }' > cat.cro.syms
                ${OBJCOPY} --redefine-syms cat.cro.syms cat/ cat.cro

You'll probably want to audit all the common symbols involved too.


Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635

Home | Main Index | Thread Index | Old Index