Author: emaste
Date: Fri Apr  1 23:47:10 2011
New Revision: 220256
URL: http://svn.freebsd.org/changeset/base/220256

Log:
  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

Added:
  head/share/examples/kld/firmware/fwimage/firmware.img.uu   (contents, props 
changed)
Deleted:
  head/share/examples/kld/firmware/fwimage/firmware.img.in
Modified:
  head/share/examples/Makefile
  head/share/examples/kld/firmware/fwimage/Makefile

Modified: head/share/examples/Makefile
==============================================================================
--- head/share/examples/Makefile        Fri Apr  1 20:59:23 2011        
(r220255)
+++ head/share/examples/Makefile        Fri Apr  1 23:47:10 2011        
(r220256)
@@ -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 \

Modified: head/share/examples/kld/firmware/fwimage/Makefile
==============================================================================
--- head/share/examples/kld/firmware/fwimage/Makefile   Fri Apr  1 20:59:23 
2011        (r220255)
+++ head/share/examples/kld/firmware/fwimage/Makefile   Fri Apr  1 23:47:10 
2011        (r220256)
@@ -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>

Added: head/share/examples/kld/firmware/fwimage/firmware.img.uu
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/examples/kld/firmware/fwimage/firmware.img.uu    Fri Apr  1 
23:47:10 2011        (r220256)
@@ -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
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to