mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Adjust the indentation of the trampoline compilation to make the commands
easier to follow.
This commit is contained in:
parent
573447b6a5
commit
462018c56b
1 changed files with 18 additions and 19 deletions
|
|
@ -82,44 +82,43 @@ ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$M/inckern.S $S/$M/$M/elf_trampoline.c
|
|||
echo "#define KERNNAME \"${KERNEL_KO}.tmp\"" >opt_kernname.h
|
||||
sed s/${KERNVIRTADDR}/${KERNPHYSADDR}/ ldscript.$M > ldscript.$M.tramp
|
||||
sed s/" + SIZEOF_HEADERS"// ldscript.$M.tramp > \
|
||||
ldscript.$M.tramp.noheader
|
||||
ldscript.$M.tramp.noheader
|
||||
echo "#include <machine/asm.h>" >tmphack.S
|
||||
echo "ENTRY(_start)" >>tmphack.S
|
||||
echo "bl _startC" >>tmphack.S
|
||||
${OBJCOPY} --strip-symbol '$$d' --strip-symbol '$$a' \
|
||||
-g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp
|
||||
-g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp
|
||||
eval $$(stat -s ${KERNEL_KO}.tmp) && \
|
||||
echo "#define KERNSIZE $$st_size" >>opt_kernname.h
|
||||
echo "#define KERNSIZE $$st_size" >>opt_kernname.h
|
||||
${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker ldscript.$M.tramp \
|
||||
tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
|
||||
${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp
|
||||
tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
|
||||
${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp
|
||||
${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \
|
||||
ldscript.$M.tramp.noheader \
|
||||
tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
|
||||
ldscript.$M.tramp.noheader \
|
||||
tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \
|
||||
${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader
|
||||
${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \
|
||||
${KERNEL_KO}.tramp.bin
|
||||
${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \
|
||||
${KERNEL_KO}.tramp.bin
|
||||
${OBJCOPY} ${STRIP_FLAGS} ${KERNEL_KO}.tmp
|
||||
echo "#define KERNNAME \"${KERNEL_KO}.tmp.gz\"" \
|
||||
>opt_kernname.h
|
||||
echo "#define KERNNAME \"${KERNEL_KO}.tmp.gz\"" >opt_kernname.h
|
||||
eval $$(stat -s ${KERNEL_KO}.tmp) && \
|
||||
echo "#define KERNSIZE $$st_size" >>opt_kernname.h
|
||||
echo "#define KERNSIZE $$st_size" >>opt_kernname.h
|
||||
gzip -f9 ${KERNEL_KO}.tmp
|
||||
eval $$(stat -s ${KERNEL_KO}.tmp.gz) && \
|
||||
echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h
|
||||
echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h
|
||||
${CC} -O2 -ffreestanding -DKZIP -I. -I$S -c $S/kern/inflate.c -o \
|
||||
inflate-tramp.o
|
||||
${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker ldscript.$M.tramp \
|
||||
-DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \
|
||||
$S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.gz.tramp
|
||||
-DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \
|
||||
$S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.gz.tramp
|
||||
${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \
|
||||
ldscript.$M.tramp.noheader \
|
||||
-DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \
|
||||
$S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader
|
||||
ldscript.$M.tramp.noheader \
|
||||
-DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \
|
||||
$S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader
|
||||
${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \
|
||||
${KERNEL_KO}.gz.tramp.bin
|
||||
rm ${KERNEL_KO}.tmp.gz ${KERNEL_KO}.tramp.noheader opt_kernname.h \
|
||||
inflate-tramp.o tmphack.S
|
||||
inflate-tramp.o tmphack.S
|
||||
|
||||
MKMODULESENV+= MACHINE=${MACHINE}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue