Uuencode the sample "binary" firmware image file (instead of explicitly

adding \0 bytes).  This is a technique that would be used in an actual
driver and is more suitable as an example.

Reviewed by:    mlaier
This commit is contained in:
Ed Maste 2011-04-01 23:47:10 +00:00
parent 86be754604
commit bedca8b119
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220256
4 changed files with 21 additions and 24 deletions

View File

@ -99,7 +99,7 @@ XFILES= BSD_daemon/FreeBSD.pfa \
kld/firmware/fwconsumer/Makefile \
kld/firmware/fwconsumer/fw_consumer.c \
kld/firmware/fwimage/Makefile \
kld/firmware/fwimage/firmware.img.in \
kld/firmware/fwimage/firmware.img.uu \
kld/khelp/Makefile \
kld/khelp/README \
kld/khelp/h_example.c \

View File

@ -3,8 +3,9 @@
KMOD= beastie
FIRMWS= firmware.img:beastie
firmware.img: firmware.img.in
cp ${.ALLSRC} ${.TARGET}
printf '\0\0\0\0\0' >> ${.TARGET}
CLEANFILES= firmware.img
firmware.img: firmware.img.uu
uudecode -p ${.ALLSRC} > ${.TARGET}
.include <bsd.kmod.mk>

View File

@ -1,20 +0,0 @@
$FreeBSD$
, ,
/( )
\ \___ / |
/- _ -/ '
(/\/ \ \ /\
/ / | \
O O ) / |
-^--'< '
(_.) _ ) /
.___/ /
-----' /
<----. __ / __ \
<----|====O)))==) \) /====
<----' --' .__,' \
| |
\ / /\
______( (_ / \______/
,' ,-----' |
--{__________) Copyright (c) 2003 Scott Long

View File

@ -0,0 +1,16 @@
$FreeBSD$
begin 644 firmware.img
M("`@("`@("`@("`@("`L("`@("`@("`L"B`@("`@("`@("`@("`O*"`@("`@
M("`@*0H@("`@("`@("`@("`@7"!<7U]?("`@+R!\"B`@("`@("`@("`@("`O
M+2!?("`M+R`@)PH@("`@("`@("`@("`H+UPO(%P@7"`@("]<"B`@("`@("`@
M("`@("\@+R`@('P@("`@(%P*("`@("`@("`@("`@3R!/("`@*2`O("`@('P*
M("`@("`@("`@("`@+5XM+2<\("`@("`G"B`@("`@("`@("`@*%\N*2`@7R`@
M*2`@("\*("`@("`@("`@("`@+E]?7R\@("`@+PH@("`@("`@("`@("`@("TM
M+2TM)R`O"B`\+2TM+2X@("`@(%]?("\@7U\@("!<"B`\+2TM+7P]/3T]3RDI
M*3T]*2!<*2`O/3T]/0H@/"TM+2TG("`@("TM)R`N7U\L)R!<"B`@("`@("`@
M("`@("`@?"`@("`@("`@?`H@("`@("`@("`@("`@("!<("`@("`@("\@("`@
M("`@+UP*("`@("`@("`@(%]?7U]?7R@@*%\@("\@7%]?7U]?7R\*("`@("`@
M("`L)R`@+"TM+2TM)R`@('P*("`@("`@("`M+7M?7U]?7U]?7U]?*2`@0V]P
@>7)I9VAT("AC*2`R,#`S(%-C;W1T($QO;F<*````````
`
end