diff options
author | emaste <emaste@FreeBSD.org> | 2011-04-01 23:47:10 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2011-04-01 23:47:10 +0000 |
commit | da413ebf3dadb0dc6e3e9ecf227be8ba949f9099 (patch) | |
tree | b31d46f93554002a0b3fc4c022deb98e234f4ee5 /share/examples | |
parent | 0f498a13f1a9eef57e9e444b2184e5e15490c671 (diff) | |
download | FreeBSD-src-da413ebf3dadb0dc6e3e9ecf227be8ba949f9099.zip FreeBSD-src-da413ebf3dadb0dc6e3e9ecf227be8ba949f9099.tar.gz |
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
Diffstat (limited to 'share/examples')
-rw-r--r-- | share/examples/Makefile | 2 | ||||
-rw-r--r-- | share/examples/kld/firmware/fwimage/Makefile | 7 | ||||
-rw-r--r-- | share/examples/kld/firmware/fwimage/firmware.img.in | 20 | ||||
-rw-r--r-- | share/examples/kld/firmware/fwimage/firmware.img.uu | 16 |
4 files changed, 21 insertions, 24 deletions
diff --git a/share/examples/Makefile b/share/examples/Makefile index 0234e64..abe40f1 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -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 \ diff --git a/share/examples/kld/firmware/fwimage/Makefile b/share/examples/kld/firmware/fwimage/Makefile index 6c62182..1ff8c46 100644 --- a/share/examples/kld/firmware/fwimage/Makefile +++ b/share/examples/kld/firmware/fwimage/Makefile @@ -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> diff --git a/share/examples/kld/firmware/fwimage/firmware.img.in b/share/examples/kld/firmware/fwimage/firmware.img.in deleted file mode 100644 index a77e080..0000000 --- a/share/examples/kld/firmware/fwimage/firmware.img.in +++ /dev/null @@ -1,20 +0,0 @@ -$FreeBSD$ - , , - /( ) - \ \___ / | - /- _ -/ ' - (/\/ \ \ /\ - / / | \ - O O ) / | - -^--'< ' - (_.) _ ) / - .___/ / - -----' / - <----. __ / __ \ - <----|====O)))==) \) /==== - <----' --' .__,' \ - | | - \ / /\ - ______( (_ / \______/ - ,' ,-----' | - --{__________) Copyright (c) 2003 Scott Long diff --git a/share/examples/kld/firmware/fwimage/firmware.img.uu b/share/examples/kld/firmware/fwimage/firmware.img.uu new file mode 100644 index 0000000..889fa7e --- /dev/null +++ b/share/examples/kld/firmware/fwimage/firmware.img.uu @@ -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 |