diff --git a/src/bsp/lk/lib/libc/string/arch/arm/arm-m/memcpy.S b/src/bsp/lk/lib/libc/string/arch/arm/arm-m/memcpy.S
new file mode 100644
index 0000000..46ce8cb
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/arm/arm-m/memcpy.S
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2014 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <asm.h>
+#include <arch/arm/cores.h>
+
+.text
+.syntax unified
+.thumb
+.align 2
+
+/* void bcopy(const void *src, void *dest, size_t n); */
+FUNCTION(bcopy)
+    // swap args for bcopy
+    mov     r12, r0
+    mov     r0, r1
+    mov     r1, r12
+
+/* void *memcpy(void *dest, const void *src, size_t count) */
+FUNCTION(memcpy)
+    push    { r0, r14 }
+
+    // test for zero length or pointers being equivalent
+    cbz     r2, .L_done
+    cmp     r0, r1
+    beq     .L_done
+
+    // check for a short copy len
+    cmp     r2, #16
+    blt     .L_bytewise
+
+    // check to see if the pointers are similarly dword aligned
+    eors    r3, r0, r1
+    ands    r3, #7
+    beq     .L_prepare_dword
+
+    // see how many bytes we need to move to align dest to word boundary
+    and     r3, r0, #3
+    cbz     r3, .L_prepare_wordwise
+    rsb     r3, #4
+    subs    r2, r3
+
+    .align 2
+.L_bytewise_align:
+    // bytewise to align memcpy
+    ldrb    r12, [r1], #1
+    subs    r3, r3, #1
+    strb    r12, [r0], #1
+    bgt     .L_bytewise_align
+
+.L_prepare_wordwise:
+    // load the number of words left
+    lsrs    r3, r2, #2
+
+    .align 2
+.L_wordwise:
+    // wordwise copy
+    ldr     r12, [r1], #4
+    subs    r3, r3, #1
+    str     r12, [r0], #4
+    bgt     .L_wordwise
+
+    // remaining bytes
+    ands     r2, #3
+    beq     .L_done
+
+    .align 2
+.L_bytewise:
+    // simple bytewise copy
+    ldrb    r12, [r1], #1
+    subs    r2, r2, #1
+    strb    r12, [r0], #1
+    bgt     .L_bytewise
+
+.L_done:
+    pop     { r0, pc }
+
+// Handle copying by dword (8 bytes at a time) increments
+.L_prepare_dword:
+    // see how many bytes we need to move to align dest to dword boundary
+    and     r3, r0, #7
+    cbz     r3, .L_prepare_dwordwise
+    rsb     r3, #8
+    subs    r2, r3
+
+    .align 2
+.L_bytewise_align_dword:
+    // bytewise to align memcpy
+    ldrb    r12, [r1], #1
+    subs    r3, r3, #1
+    strb    r12, [r0], #1
+    bgt     .L_bytewise_align_dword
+
+.L_prepare_dwordwise:
+    // load the number of dwords left
+    lsrs    r3, r2, #3
+
+    push    { r5 }
+
+    .align 2
+.L_dwordwise:
+    // dwordwise copy
+    ldrd    r5, r12, [r1], #8
+    subs    r3, r3, #1
+    strd    r5, r12, [r0], #8
+    bgt     .L_dwordwise
+
+    pop     { r5 }
+
+    // remaining bytes
+    ands     r2, #7
+    beq     .L_done
+
+    // finish the remaining bytes and exit
+    b       .L_bytewise
+
diff --git a/src/bsp/lk/lib/libc/string/arch/arm/arm-m/memset.S b/src/bsp/lk/lib/libc/string/arch/arm/arm-m/memset.S
new file mode 100644
index 0000000..0b54e3c
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/arm/arm-m/memset.S
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2014 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <asm.h>
+#include <arch/arm/cores.h>
+
+.text
+.syntax unified
+.thumb
+.align 2
+
+/* void bzero(void *s, size_t n); */
+FUNCTION(bzero)
+    mov     r2, r1
+    movs    r1, #0
+
+/* void *memset(void *s, int c, size_t n); */
+FUNCTION(memset)
+    // save the original pointer
+    push    { r0, lr }
+
+    // check for zero length
+    cbz     r2, .L_done
+
+    // short memsets aren't worth optimizing and make sure we have
+    // enough headroom to try to do dwordwise move optimization
+    cmp     r2, #16
+    blt     .L_bytewise
+
+    // see how many bytes we need to move to align to dword boundaries
+    and     r3, r0, #7
+    cbz     r3, .L_prepare_dwordwise
+    rsb     r3, #8
+    subs    r2, r3
+
+.L_bytewise_align:
+    // bytewise to align memset
+    subs    r3, r3, #1
+    strb    r1, [r0], #1
+    bgt     .L_bytewise_align
+
+.L_prepare_dwordwise:
+    // fill a pair of 32 bit registers with the 8 bit value
+    uxtb    r1, r1
+    orr     r1, r1, r1, lsl #8
+    orr     r1, r1, r1, lsl #16
+    mov     r12, r1
+
+    // load the number of dwords left
+    lsrs    r3, r2, #3
+
+.L_dwordwise:
+    // dwordwise memset
+    subs    r3, r3, #1
+    strd    r1, r12, [r0], #8
+    bgt     .L_dwordwise
+
+    // remaining bytes
+    ands     r2, #7
+    beq     .L_done
+
+.L_bytewise:
+    // bytewise memset
+    subs    r2, r2, #1
+    strb    r1, [r0], #1
+    bgt     .L_bytewise
+
+.L_done:
+    // restore the base pointer as return value
+    pop     { r0, pc }
+
diff --git a/src/bsp/lk/lib/libc/string/arch/arm/arm/memcpy.S b/src/bsp/lk/lib/libc/string/arch/arm/arm/memcpy.S
new file mode 100644
index 0000000..efe46df
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/arm/arm/memcpy.S
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <asm.h>
+#include <arch/arm/cores.h>
+
+.text
+.align 2
+
+/* void bcopy(const void *src, void *dest, size_t n); */
+FUNCTION(bcopy)
+    // swap args for bcopy
+    mov     r12, r0
+    mov     r0, r1
+    mov     r1, r12
+
+/* void *memcpy(void *dest, const void *src, size_t n); */
+FUNCTION(memmove)
+FUNCTION(memcpy)
+    // check for zero length copy or the same pointer
+    cmp     r2, #0
+    cmpne   r1, r0
+    bxeq    lr
+
+    // save a few registers for use and the return code (input dst)
+    stmfd   sp!, {r0, r4, r5, lr}
+
+    // check for forwards overlap (src > dst, distance < len)
+    subs    r3, r0, r1
+    cmphi   r2, r3
+    bhi     .L_forwardoverlap
+
+    // check for a short copy len.
+    // 20 bytes is enough so that if a 16 byte alignment needs to happen there is at least a 
+    //   wordwise copy worth of work to be done.
+    cmp     r2, #(16+4)
+    blo     .L_bytewise
+
+    // see if they are similarly aligned on 4 byte boundaries
+    eor     r3, r0, r1
+    tst     r3, #3
+    bne     .L_bytewise     // dissimilarly aligned, nothing we can do (for now)
+
+    // check for 16 byte alignment on dst.
+    // this will also catch src being not 4 byte aligned, since it is similarly 4 byte 
+    //   aligned with dst at this point.
+    tst     r0, #15
+    bne     .L_not16bytealigned
+
+    // check to see if we have at least 32 bytes of data to copy.
+    // if not, just revert to wordwise copy
+    cmp     r2, #32
+    blo     .L_wordwise
+
+.L_bigcopy:
+    // copy 32 bytes at a time. src & dst need to be at least 4 byte aligned, 
+    // and we need at least 32 bytes remaining to copy
+
+    // save r6-r7 for use in the big copy
+    stmfd   sp!, {r6-r11}
+
+    sub     r2, r2, #32     // subtract an extra 32 to the len so we can avoid an extra compare
+
+.L_bigcopy_loop:
+    pld     [r1, #64]
+    ldmia   r1!, {r4-r11}
+    subs    r2, r2, #32
+    stmia   r0!, {r4-r11}
+    bhs     .L_bigcopy_loop
+
+    // restore r6-r7
+    ldmfd   sp!, {r6-r11}
+
+    // see if we are done
+    adds    r2, r2, #32
+    beq     .L_done
+
+    // less then 4 bytes left?
+    cmp     r2, #4
+    blo     .L_bytewise
+
+.L_wordwise:
+    // copy 4 bytes at a time.
+    // src & dst are guaranteed to be word aligned, and at least 4 bytes are left to copy.
+    subs    r2, r2, #4
+
+.L_wordwise_loop:
+    ldr     r3, [r1], #4
+    subs    r2, r2, #4
+    str     r3, [r0], #4
+    bhs     .L_wordwise_loop
+
+    // correct the remaining len and test for completion
+    adds    r2, r2, #4  
+    beq     .L_done
+
+.L_bytewise:
+    // simple bytewise copy
+    ldrb    r3, [r1], #1
+    subs    r2, r2, #1
+    strb    r3, [r0], #1
+    bhi     .L_bytewise
+
+.L_done:
+    // load dst for return and restore r4,r5
+#if ARM_ARCH_LEVEL >= 5
+    ldmfd   sp!, {r0, r4, r5, pc}
+#else
+    ldmfd   sp!, {r0, r4, r5, lr}
+    bx      lr
+#endif
+
+.L_not16bytealigned:
+    // dst is not 16 byte aligned, so we will copy up to 15 bytes to get it aligned.
+    // src is guaranteed to be similarly word aligned with dst.
+
+    // set the condition flags based on the alignment.
+    lsl     r12, r0, #28
+    rsb     r12, r12, #0
+    msr     CPSR_f, r12             // move into NZCV fields in CPSR
+
+    // move as many bytes as necessary to get the dst aligned
+    ldrvsb  r3, [r1], #1            // V set
+    ldrcsh  r4, [r1], #2            // C set
+    ldreq   r5, [r1], #4            // Z set
+
+    strvsb  r3, [r0], #1
+    strcsh  r4, [r0], #2
+    streq   r5, [r0], #4
+
+    ldmmiia r1!, {r3-r4}            // N set
+    stmmiia r0!, {r3-r4}
+
+    // fix the remaining len
+    sub     r2, r2, r12, lsr #28
+
+    // test to see what we should do now
+    cmp     r2, #32
+    bhs     .L_bigcopy
+    b       .L_wordwise
+
+    // src and dest overlap 'forwards' or dst > src
+.L_forwardoverlap:
+
+    // do a bytewise reverse copy for now
+    add     r1, r1, r2
+    add     r0, r0, r2
+    sub     r1, r1, #1
+    sub     r0, r0, #1
+
+.L_bytewisereverse:
+    // simple bytewise reverse copy
+    ldrb    r3, [r1], #-1
+    subs    r2, r2, #1
+    strb    r3, [r0], #-1
+    bhi     .L_bytewisereverse
+
+    b       .L_done
+
diff --git a/src/bsp/lk/lib/libc/string/arch/arm/arm/memset.S b/src/bsp/lk/lib/libc/string/arch/arm/arm/memset.S
new file mode 100644
index 0000000..1307e1c
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/arm/arm/memset.S
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <asm.h>
+#include <arch/arm/cores.h>
+
+.text
+.align 2
+
+/* void bzero(void *s, size_t n); */
+FUNCTION(bzero)
+    mov     r2, r1
+    mov     r1, #0
+
+/* void *memset(void *s, int c, size_t n); */
+FUNCTION(memset)
+    // check for zero length
+    cmp     r2, #0
+    bxeq    lr
+
+    // save the original pointer
+    mov     r12, r0
+
+    // short memsets aren't worth optimizing
+    cmp     r2, #(32 + 16)
+    blt     .L_bytewise
+
+    // fill a 32 bit register with the 8 bit value
+    and     r1, r1, #0xff
+    orr     r1, r1, r1, lsl #8
+    orr     r1, r1, r1, lsl #16
+
+    // check for 16 byte alignment
+    tst     r0, #15
+    bne     .L_not16bytealigned
+
+.L_bigset:
+    // dump some registers to make space for our values
+    stmfd   sp!, { r4-r5 }
+
+    // fill a bunch of registers with the set value
+    mov     r3, r1
+    mov     r4, r1
+    mov     r5, r1
+
+    // prepare the count register so we can avoid an extra compare
+    sub     r2, r2, #32
+
+    // 32 bytes at a time
+.L_bigset_loop:
+    stmia   r0!, { r1, r3, r4, r5 }
+    subs    r2, r2, #32
+    stmia   r0!, { r1, r3, r4, r5 }
+    bge     .L_bigset_loop
+
+    // restore our dumped registers
+    ldmfd   sp!, { r4-r5 }
+
+    // see if we're done
+    adds    r2, r2, #32
+    beq     .L_done
+
+.L_bytewise:
+    // bytewise memset
+    subs    r2, r2, #1
+    strb    r1, [r0], #1
+    bgt     .L_bytewise
+
+.L_done:
+    // restore the base pointer as return value
+    mov     r0, r12
+    bx      lr
+
+.L_not16bytealigned:
+    // dst is not 16 byte aligned, so we will set up to 15 bytes to get it aligned.
+
+    // set the condition flags based on the alignment.
+    lsl     r3, r0, #28
+    rsb     r3, r3, #0
+    msr     CPSR_f, r3             // move into NZCV fields in CPSR
+
+    // move as many bytes as necessary to get the dst aligned
+    strvsb  r1, [r0], #1            // V set
+    strcsh  r1, [r0], #2            // C set
+    streq   r1, [r0], #4            // Z set
+    strmi   r1, [r0], #4            // N set
+    strmi   r1, [r0], #4            // N set
+
+    // fix the remaining len
+    sub     r2, r2, r3, lsr #28
+
+    // do the large memset
+    b       .L_bigset
+
diff --git a/src/bsp/lk/lib/libc/string/arch/arm/rules.mk b/src/bsp/lk/lib/libc/string/arch/arm/rules.mk
new file mode 100644
index 0000000..8674a9d
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/arm/rules.mk
@@ -0,0 +1,41 @@
+LOCAL_DIR := $(GET_LOCAL_DIR)
+
+ifeq ($(SUBARCH),arm)
+
+ASM_STRING_OPS := bcopy bzero memcpy memmove memset
+
+MODULE_SRCS += \
+	$(LOCAL_DIR)/arm/memcpy.S \
+	$(LOCAL_DIR)/arm/memset.S
+
+# filter out the C implementation
+C_STRING_OPS := $(filter-out $(ASM_STRING_OPS),$(C_STRING_OPS))
+endif
+
+ifeq ($(SUBARCH),arm-m)
+ifeq ($(ARM_CPU),cortex-m0)
+
+ASM_STRING_OPS :=
+
+MODULE_SRCS += \
+
+else ifeq ($(ARM_CPU),cortex-m0plus)
+
+ASM_STRING_OPS :=
+
+MODULE_SRCS += \
+
+else
+
+ASM_STRING_OPS := bcopy bzero memcpy memset
+
+MODULE_SRCS += \
+	$(LOCAL_DIR)/arm-m/memcpy.S \
+	$(LOCAL_DIR)/arm-m/memset.S
+endif
+
+# filter out the C implementation
+C_STRING_OPS := $(filter-out $(ASM_STRING_OPS),$(C_STRING_OPS))
+endif
+
+
diff --git a/src/bsp/lk/lib/libc/string/arch/arm64/rules.mk b/src/bsp/lk/lib/libc/string/arch/arm64/rules.mk
new file mode 100644
index 0000000..7a97451
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/arm64/rules.mk
@@ -0,0 +1,2 @@
+LOCAL_DIR := $(GET_LOCAL_DIR)
+
diff --git a/src/bsp/lk/lib/libc/string/arch/microblaze/rules.mk b/src/bsp/lk/lib/libc/string/arch/microblaze/rules.mk
new file mode 100644
index 0000000..3dc080b
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/microblaze/rules.mk
@@ -0,0 +1,11 @@
+LOCAL_DIR := $(GET_LOCAL_DIR)
+
+ASM_STRING_OPS := #bcopy bzero memcpy memmove memset
+
+MODULE_SRCS += \
+	#$(LOCAL_DIR)/memcpy.S \
+	#$(LOCAL_DIR)/memset.S
+
+# filter out the C implementation
+C_STRING_OPS := $(filter-out $(ASM_STRING_OPS),$(C_STRING_OPS))
+
diff --git a/src/bsp/lk/lib/libc/string/arch/mips/rules.mk b/src/bsp/lk/lib/libc/string/arch/mips/rules.mk
new file mode 100644
index 0000000..3dc080b
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/mips/rules.mk
@@ -0,0 +1,11 @@
+LOCAL_DIR := $(GET_LOCAL_DIR)
+
+ASM_STRING_OPS := #bcopy bzero memcpy memmove memset
+
+MODULE_SRCS += \
+	#$(LOCAL_DIR)/memcpy.S \
+	#$(LOCAL_DIR)/memset.S
+
+# filter out the C implementation
+C_STRING_OPS := $(filter-out $(ASM_STRING_OPS),$(C_STRING_OPS))
+
diff --git a/src/bsp/lk/lib/libc/string/arch/or1k/rules.mk b/src/bsp/lk/lib/libc/string/arch/or1k/rules.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/or1k/rules.mk
diff --git a/src/bsp/lk/lib/libc/string/arch/x86-64/memcpy.S b/src/bsp/lk/lib/libc/string/arch/x86-64/memcpy.S
new file mode 100644
index 0000000..84aec44
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/x86-64/memcpy.S
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2009 Corey Tabaka
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <asm.h>
+
+/* TODO: */
+
+.text
+.align 2
+
+/* void bcopy(const void *src, void *dest, size_t n); */
+FUNCTION(bcopy)
+    ret
+
+/* void *memcpy(void *dest, const void *src, size_t n); */
+FUNCTION(memmove)
+FUNCTION(memcpy)
+    ret
+
diff --git a/src/bsp/lk/lib/libc/string/arch/x86-64/memset.S b/src/bsp/lk/lib/libc/string/arch/x86-64/memset.S
new file mode 100644
index 0000000..43367f6
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/x86-64/memset.S
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2009 Corey Tabaka
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <asm.h>
+
+/* TODO: */
+
+.text
+.align 2
+
+/* void bzero(void *s, size_t n); */
+FUNCTION(bzero)
+    ret
+
+/* void *memset(void *s, int c, size_t n); */
+FUNCTION(memset)
+    ret
+
diff --git a/src/bsp/lk/lib/libc/string/arch/x86-64/rules.mk b/src/bsp/lk/lib/libc/string/arch/x86-64/rules.mk
new file mode 100644
index 0000000..3dc080b
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/x86-64/rules.mk
@@ -0,0 +1,11 @@
+LOCAL_DIR := $(GET_LOCAL_DIR)
+
+ASM_STRING_OPS := #bcopy bzero memcpy memmove memset
+
+MODULE_SRCS += \
+	#$(LOCAL_DIR)/memcpy.S \
+	#$(LOCAL_DIR)/memset.S
+
+# filter out the C implementation
+C_STRING_OPS := $(filter-out $(ASM_STRING_OPS),$(C_STRING_OPS))
+
diff --git a/src/bsp/lk/lib/libc/string/arch/x86/memcpy.S b/src/bsp/lk/lib/libc/string/arch/x86/memcpy.S
new file mode 100644
index 0000000..84aec44
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/x86/memcpy.S
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2009 Corey Tabaka
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <asm.h>
+
+/* TODO: */
+
+.text
+.align 2
+
+/* void bcopy(const void *src, void *dest, size_t n); */
+FUNCTION(bcopy)
+    ret
+
+/* void *memcpy(void *dest, const void *src, size_t n); */
+FUNCTION(memmove)
+FUNCTION(memcpy)
+    ret
+
diff --git a/src/bsp/lk/lib/libc/string/arch/x86/memset.S b/src/bsp/lk/lib/libc/string/arch/x86/memset.S
new file mode 100644
index 0000000..43367f6
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/x86/memset.S
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2009 Corey Tabaka
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <asm.h>
+
+/* TODO: */
+
+.text
+.align 2
+
+/* void bzero(void *s, size_t n); */
+FUNCTION(bzero)
+    ret
+
+/* void *memset(void *s, int c, size_t n); */
+FUNCTION(memset)
+    ret
+
diff --git a/src/bsp/lk/lib/libc/string/arch/x86/rules.mk b/src/bsp/lk/lib/libc/string/arch/x86/rules.mk
new file mode 100644
index 0000000..3dc080b
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/arch/x86/rules.mk
@@ -0,0 +1,11 @@
+LOCAL_DIR := $(GET_LOCAL_DIR)
+
+ASM_STRING_OPS := #bcopy bzero memcpy memmove memset
+
+MODULE_SRCS += \
+	#$(LOCAL_DIR)/memcpy.S \
+	#$(LOCAL_DIR)/memset.S
+
+# filter out the C implementation
+C_STRING_OPS := $(filter-out $(ASM_STRING_OPS),$(C_STRING_OPS))
+
diff --git a/src/bsp/lk/lib/libc/string/bcopy.c b/src/bsp/lk/lib/libc/string/bcopy.c
new file mode 100644
index 0000000..cc025ff
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/bcopy.c
@@ -0,0 +1,34 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+void bcopy(void const *src, void *dest, size_t count)
+{
+    memcpy(dest, src, count);
+}
+
diff --git a/src/bsp/lk/lib/libc/string/bzero.c b/src/bsp/lk/lib/libc/string/bzero.c
new file mode 100644
index 0000000..b787d4e
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/bzero.c
@@ -0,0 +1,35 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+void
+bzero(void *dst, size_t count)
+{
+    memset(dst, 0, count);
+}
+
diff --git a/src/bsp/lk/lib/libc/string/memchr.c b/src/bsp/lk/lib/libc/string/memchr.c
new file mode 100644
index 0000000..cb3b4bf
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/memchr.c
@@ -0,0 +1,45 @@
+/*
+** Copyright 2001, Manuel J. Petit. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+void *
+memchr(void const *buf, int c, size_t len)
+{
+    size_t i;
+    unsigned char const *b= buf;
+    unsigned char        x= (c&0xff);
+
+    for (i= 0; i< len; i++) {
+        if (b[i]== x) {
+            return (void*)(b+i);
+        }
+    }
+
+    return NULL;
+}
+
diff --git a/src/bsp/lk/lib/libc/string/memcmp.c b/src/bsp/lk/lib/libc/string/memcmp.c
new file mode 100644
index 0000000..d6c0abd
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/memcmp.c
@@ -0,0 +1,40 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+int
+memcmp(const void *cs, const void *ct, size_t count)
+{
+    const unsigned char *su1, *su2;
+    signed char res = 0;
+
+    for (su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--)
+        if ((res = *su1 - *su2) != 0)
+            break;
+    return res;
+}
diff --git a/src/bsp/lk/lib/libc/string/memcpy.c b/src/bsp/lk/lib/libc/string/memcpy.c
new file mode 100644
index 0000000..f0e439c
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/memcpy.c
@@ -0,0 +1,69 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+
+#if !_ASM_MEMCPY
+
+typedef long word;
+
+#define lsize sizeof(word)
+#define lmask (lsize - 1)
+
+void *memcpy(void *dest, const void *src, size_t count)
+{
+    char *d = (char *)dest;
+    const char *s = (const char *)src;
+    int len;
+
+    if (count == 0 || dest == src)
+        return dest;
+
+    if (((long)d | (long)s) & lmask) {
+        // src and/or dest do not align on word boundary
+        if ((((long)d ^ (long)s) & lmask) || (count < lsize))
+            len = count; // copy the rest of the buffer with the byte mover
+        else
+            len = lsize - ((long)d & lmask); // move the ptrs up to a word boundary
+
+        count -= len;
+        for (; len > 0; len--)
+            *d++ = *s++;
+    }
+    for (len = count / lsize; len > 0; len--) {
+        *(word *)d = *(word *)s;
+        d += lsize;
+        s += lsize;
+    }
+    for (len = count & lmask; len > 0; len--)
+        *d++ = *s++;
+
+    return dest;
+}
+
+#endif
diff --git a/src/bsp/lk/lib/libc/string/memmove.c b/src/bsp/lk/lib/libc/string/memmove.c
new file mode 100644
index 0000000..c7da350
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/memmove.c
@@ -0,0 +1,93 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+#if !_ASM_MEMMOVE
+
+typedef long word;
+
+#define lsize sizeof(word)
+#define lmask (lsize - 1)
+
+void *
+memmove(void *dest, void const *src, size_t count)
+{
+    char *d = (char *)dest;
+    const char *s = (const char *)src;
+    int len;
+
+    if (count == 0 || dest == src)
+        return dest;
+
+    if ((long)d < (long)s) {
+        if (((long)d | (long)s) & lmask) {
+            // src and/or dest do not align on word boundary
+            if ((((long)d ^ (long)s) & lmask) || (count < lsize))
+                len = count; // copy the rest of the buffer with the byte mover
+            else
+                len = lsize - ((long)d & lmask); // move the ptrs up to a word boundary
+
+            count -= len;
+            for (; len > 0; len--)
+                *d++ = *s++;
+        }
+        for (len = count / lsize; len > 0; len--) {
+            *(word *)d = *(word *)s;
+            d += lsize;
+            s += lsize;
+        }
+        for (len = count & lmask; len > 0; len--)
+            *d++ = *s++;
+    } else {
+        d += count;
+        s += count;
+        if (((long)d | (long)s) & lmask) {
+            // src and/or dest do not align on word boundary
+            if ((((long)d ^ (long)s) & lmask) || (count <= lsize))
+                len = count;
+            else
+                len = ((long)d & lmask);
+
+            count -= len;
+            for (; len > 0; len--)
+                *--d = *--s;
+        }
+        for (len = count / lsize; len > 0; len--) {
+            d -= lsize;
+            s -= lsize;
+            *(word *)d = *(word *)s;
+        }
+        for (len = count & lmask; len > 0; len--)
+            *--d = *--s;
+    }
+
+    return dest;
+}
+
+#endif
+
diff --git a/src/bsp/lk/lib/libc/string/memscan.c b/src/bsp/lk/lib/libc/string/memscan.c
new file mode 100644
index 0000000..babe3d3
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/memscan.c
@@ -0,0 +1,41 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <libc/string.h>
+#include <libc/ctype.h>
+
+void *memscan(void *addr, int c, size_t size)
+{
+    unsigned char *p = (unsigned char *)addr;
+
+    while (size) {
+        if (*p == c)
+            return (void *)p;
+        p++;
+        size--;
+    }
+    return (void *)p;
+}
diff --git a/src/bsp/lk/lib/libc/string/memset.c b/src/bsp/lk/lib/libc/string/memset.c
new file mode 100644
index 0000000..9a19e16
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/memset.c
@@ -0,0 +1,63 @@
+/*
+** Copyright 2005, Michael Noisternig. All rights reserved.
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+void *
+memset(void *s, int c, size_t count)
+{
+    char *xs = (char *) s;
+    size_t len = (-(size_t)s) & (sizeof(size_t)-1);
+    size_t cc = c & 0xff;
+
+    if ( count > len ) {
+        count -= len;
+        cc |= cc << 8;
+        cc |= cc << 16;
+        if (sizeof(size_t) == 8)
+            cc |= (uint64_t)cc << 32; // should be optimized out on 32 bit machines
+
+        // write to non-aligned memory byte-wise
+        for ( ; len > 0; len-- )
+            *xs++ = c;
+
+        // write to aligned memory dword-wise
+        for ( len = count/sizeof(size_t); len > 0; len-- ) {
+            *((size_t *)xs) = (size_t)cc;
+            xs += sizeof(size_t);
+        }
+
+        count &= sizeof(size_t)-1;
+    }
+
+    // write remaining bytes
+    for ( ; count > 0; count-- )
+        *xs++ = c;
+
+    return s;
+}
diff --git a/src/bsp/lk/lib/libc/string/rules.mk b/src/bsp/lk/lib/libc/string/rules.mk
new file mode 100644
index 0000000..4e28e3e
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/rules.mk
@@ -0,0 +1,42 @@
+LOCAL_DIR := $(GET_LOCAL_DIR)
+
+C_STRING_OPS := \
+	bcopy \
+	bzero \
+	memchr \
+	memcmp \
+	memcpy \
+	memmove \
+	memset \
+	strcat \
+	strchr \
+	strcmp \
+	strcoll \
+	strcpy \
+	strdup \
+	strerror \
+	strlcat \
+	strlcpy \
+	strlen \
+	strncat \
+	strncpy \
+	strncmp \
+	strnicmp \
+	strnlen \
+	strpbrk \
+	strrchr \
+	strspn \
+	strstr \
+	strtok \
+	strxfrm
+
+LIBC_STRING_C_DIR := $(LOCAL_DIR)
+
+# include the arch specific string routines
+#
+# the makefile may filter out implemented versions from the C_STRING_OPS variable
+include $(LOCAL_DIR)/arch/$(ARCH)/rules.mk
+
+MODULE_SRCS += \
+	$(addprefix $(LIBC_STRING_C_DIR)/,$(addsuffix .c,$(C_STRING_OPS)))
+
diff --git a/src/bsp/lk/lib/libc/string/strcat.c b/src/bsp/lk/lib/libc/string/strcat.c
new file mode 100644
index 0000000..c665519
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strcat.c
@@ -0,0 +1,42 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+char *
+strcat(char *dest,  char const*src)
+{
+    char *tmp = dest;
+
+    while (*dest)
+        dest++;
+    while ((*dest++ = *src++) != '\0')
+        ;
+
+    return tmp;
+}
+
diff --git a/src/bsp/lk/lib/libc/string/strchr.c b/src/bsp/lk/lib/libc/string/strchr.c
new file mode 100644
index 0000000..f57e5d1
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strchr.c
@@ -0,0 +1,37 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+char *
+strchr(const char *s, int c)
+{
+    for (; *s != (char) c; ++s)
+        if (*s == '\0')
+            return NULL;
+    return (char *) s;
+}
diff --git a/src/bsp/lk/lib/libc/string/strcmp.c b/src/bsp/lk/lib/libc/string/strcmp.c
new file mode 100644
index 0000000..a89d57c
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strcmp.c
@@ -0,0 +1,41 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+int
+strcmp(char const *cs, char const *ct)
+{
+    signed char __res;
+
+    while (1) {
+        if ((__res = *cs - *ct++) != 0 || !*cs++)
+            break;
+    }
+
+    return __res;
+}
diff --git a/src/bsp/lk/lib/libc/string/strcoll.c b/src/bsp/lk/lib/libc/string/strcoll.c
new file mode 100644
index 0000000..549cb89
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strcoll.c
@@ -0,0 +1,34 @@
+/*
+** Copyright 2004, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+
+int
+strcoll(const char *s1, const char *s2)
+{
+    return strcmp(s1, s2);
+}
+
diff --git a/src/bsp/lk/lib/libc/string/strcpy.c b/src/bsp/lk/lib/libc/string/strcpy.c
new file mode 100644
index 0000000..f8f43e1
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strcpy.c
@@ -0,0 +1,39 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+char *
+strcpy(char *dest, char const *src)
+{
+    char *tmp = dest;
+
+    while ((*dest++ = *src++) != '\0')
+        ;
+    return tmp;
+}
+
diff --git a/src/bsp/lk/lib/libc/string/strdup.c b/src/bsp/lk/lib/libc/string/strdup.c
new file mode 100644
index 0000000..ee292c4
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strdup.c
@@ -0,0 +1,43 @@
+/*
+** Copyright 2004, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <stdlib.h>
+#include <string.h>
+
+char *
+strdup(const char *str)
+{
+    size_t len;
+    char *copy;
+
+    len = strlen(str) + 1;
+    copy = malloc(len);
+    if (copy == NULL)
+        return NULL;
+    memcpy(copy, str, len);
+    return copy;
+}
+
diff --git a/src/bsp/lk/lib/libc/string/strerror.c b/src/bsp/lk/lib/libc/string/strerror.c
new file mode 100644
index 0000000..49941ac
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strerror.c
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <string.h>
+#include <sys/types.h>
+
+char *
+strerror(int errnum)
+{
+    if (errnum < 0) {
+        return (char *)"General Error";
+    } else {
+        return (char *)"No Error";
+    }
+}
+
diff --git a/src/bsp/lk/lib/libc/string/strlcat.c b/src/bsp/lk/lib/libc/string/strlcat.c
new file mode 100644
index 0000000..4760e91
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strlcat.c
@@ -0,0 +1,50 @@
+/*
+** Copyright 2002, Manuel J. Petit. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <string.h>
+#include <sys/types.h>
+
+size_t
+strlcat(char *dst, char const *src, size_t s)
+{
+    size_t i;
+    size_t j= strnlen(dst, s);
+
+    if (!s) {
+        return j+strlen(src);
+    }
+
+    dst+= j;
+
+    for (i= 0; ((i< s-1) && src[i]); i++) {
+        dst[i]= src[i];
+    }
+
+    dst[i]= 0;
+
+    return j + i + strlen(src+i);
+}
diff --git a/src/bsp/lk/lib/libc/string/strlcpy.c b/src/bsp/lk/lib/libc/string/strlcpy.c
new file mode 100644
index 0000000..7c76be6
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strlcpy.c
@@ -0,0 +1,47 @@
+/*
+** Copyright 2002, Manuel J. Petit. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <string.h>
+#include <sys/types.h>
+
+size_t
+strlcpy(char *dst, char const *src, size_t s)
+{
+    size_t i= 0;
+
+    if (!s) {
+        return strlen(src);
+    }
+
+    for (i= 0; ((i< s-1) && src[i]); i++) {
+        dst[i]= src[i];
+    }
+
+    dst[i]= 0;
+
+    return i + strlen(src+i);
+}
diff --git a/src/bsp/lk/lib/libc/string/strlen.c b/src/bsp/lk/lib/libc/string/strlen.c
new file mode 100644
index 0000000..1659f78
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strlen.c
@@ -0,0 +1,41 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+size_t
+strlen(char const *s)
+{
+    size_t i;
+
+    i= 0;
+    while (s[i]) {
+        i+= 1;
+    }
+
+    return i;
+}
diff --git a/src/bsp/lk/lib/libc/string/strncat.c b/src/bsp/lk/lib/libc/string/strncat.c
new file mode 100644
index 0000000..078c33d
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strncat.c
@@ -0,0 +1,48 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+char *
+strncat(char *dest, char const *src, size_t count)
+{
+    char *tmp = dest;
+
+    if (count > 0) {
+        while (*dest)
+            dest++;
+        while ((*dest++ = *src++)) {
+            if (--count == 0) {
+                *dest = '\0';
+                break;
+            }
+        }
+    }
+
+    return tmp;
+}
+
diff --git a/src/bsp/lk/lib/libc/string/strncmp.c b/src/bsp/lk/lib/libc/string/strncmp.c
new file mode 100644
index 0000000..4185482
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strncmp.c
@@ -0,0 +1,42 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+int
+strncmp(char const *cs, char const *ct, size_t count)
+{
+    signed char __res = 0;
+
+    while (count > 0) {
+        if ((__res = *cs - *ct++) != 0 || !*cs++)
+            break;
+        count--;
+    }
+
+    return __res;
+}
diff --git a/src/bsp/lk/lib/libc/string/strncpy.c b/src/bsp/lk/lib/libc/string/strncpy.c
new file mode 100644
index 0000000..70ea19b
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strncpy.c
@@ -0,0 +1,40 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+char *
+strncpy(char *dest, char const *src, size_t count)
+{
+    char *tmp = dest;
+
+    while (count-- && (*dest++ = *src++) != '\0')
+        ;
+
+    return tmp;
+}
+
diff --git a/src/bsp/lk/lib/libc/string/strnicmp.c b/src/bsp/lk/lib/libc/string/strnicmp.c
new file mode 100644
index 0000000..67c7b9f
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strnicmp.c
@@ -0,0 +1,57 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <ctype.h>
+#include <sys/types.h>
+
+int
+strnicmp(char const *s1, char const *s2, size_t len)
+{
+    unsigned char c1 = '\0';
+    unsigned char c2 = '\0';
+
+    if (len > 0) {
+        do {
+            c1 = *s1;
+            c2 = *s2;
+            s1++;
+            s2++;
+            if (!c1)
+                break;
+            if (!c2)
+                break;
+            if (c1 == c2)
+                continue;
+            c1 = tolower(c1);
+            c2 = tolower(c2);
+            if (c1 != c2)
+                break;
+        } while (--len);
+    }
+    return (int)c1 - (int)c2;
+}
+#pragma weak strncasecmp=strnicmp
diff --git a/src/bsp/lk/lib/libc/string/strnlen.c b/src/bsp/lk/lib/libc/string/strnlen.c
new file mode 100644
index 0000000..07e56e8
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strnlen.c
@@ -0,0 +1,38 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+size_t
+strnlen(char const *s, size_t count)
+{
+    const char *sc;
+
+    for (sc = s; count-- && *sc != '\0'; ++sc)
+        ;
+    return sc - s;
+}
diff --git a/src/bsp/lk/lib/libc/string/strpbrk.c b/src/bsp/lk/lib/libc/string/strpbrk.c
new file mode 100644
index 0000000..0812037
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strpbrk.c
@@ -0,0 +1,44 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+char *
+strpbrk(char const *cs, char const *ct)
+{
+    const char *sc1;
+    const char *sc2;
+
+    for (sc1 = cs; *sc1 != '\0'; ++sc1) {
+        for (sc2 = ct; *sc2 != '\0'; ++sc2) {
+            if (*sc1 == *sc2)
+                return (char *)sc1;
+        }
+    }
+
+    return NULL;
+}
diff --git a/src/bsp/lk/lib/libc/string/strrchr.c b/src/bsp/lk/lib/libc/string/strrchr.c
new file mode 100644
index 0000000..f0dc21c
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strrchr.c
@@ -0,0 +1,45 @@
+/*
+** Copyright 2001, Manuel J. Petit. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+char *
+strrchr(char const *s, int c)
+{
+    char const *last= c?0:s;
+
+
+    while (*s) {
+        if (*s== c) {
+            last= s;
+        }
+
+        s+= 1;
+    }
+
+    return (char *)last;
+}
diff --git a/src/bsp/lk/lib/libc/string/strspn.c b/src/bsp/lk/lib/libc/string/strspn.c
new file mode 100644
index 0000000..bfeb7ac
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strspn.c
@@ -0,0 +1,48 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+size_t
+strspn(char const *s, char const *accept)
+{
+    const char *p;
+    const char *a;
+    size_t count = 0;
+
+    for (p = s; *p != '\0'; ++p) {
+        for (a = accept; *a != '\0'; ++a) {
+            if (*p == *a)
+                break;
+        }
+        if (*a == '\0')
+            return count;
+        ++count;
+    }
+
+    return count;
+}
diff --git a/src/bsp/lk/lib/libc/string/strstr.c b/src/bsp/lk/lib/libc/string/strstr.c
new file mode 100644
index 0000000..15dc6af
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strstr.c
@@ -0,0 +1,46 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+char *
+strstr(char const *s1, char const *s2)
+{
+    int l1, l2;
+
+    l2 = strlen(s2);
+    if (!l2)
+        return (char *)s1;
+    l1 = strlen(s1);
+    while (l1 >= l2) {
+        l1--;
+        if (!memcmp(s1,s2,l2))
+            return (char *)s1;
+        s1++;
+    }
+    return NULL;
+}
diff --git a/src/bsp/lk/lib/libc/string/strtok.c b/src/bsp/lk/lib/libc/string/strtok.c
new file mode 100644
index 0000000..4839614
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strtok.c
@@ -0,0 +1,51 @@
+/*
+** Copyright 2001, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+static char *___strtok = NULL;
+
+char *
+strtok(char *s, char const *ct)
+{
+    char *sbegin, *send;
+
+    sbegin  = s ? s : ___strtok;
+    if (!sbegin) {
+        return NULL;
+    }
+    sbegin += strspn(sbegin,ct);
+    if (*sbegin == '\0') {
+        ___strtok = NULL;
+        return ( NULL );
+    }
+    send = strpbrk( sbegin, ct);
+    if (send && *send != '\0')
+        *send++ = '\0';
+    ___strtok = send;
+    return (sbegin);
+}
diff --git a/src/bsp/lk/lib/libc/string/strxfrm.c b/src/bsp/lk/lib/libc/string/strxfrm.c
new file mode 100644
index 0000000..0eff870
--- /dev/null
+++ b/src/bsp/lk/lib/libc/string/strxfrm.c
@@ -0,0 +1,42 @@
+/*
+** Copyright 2004, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <string.h>
+#include <sys/types.h>
+
+size_t
+strxfrm(char *dest, const char *src, size_t n)
+{
+    size_t len = strlen(src);
+
+    if (n) {
+        size_t copy_len = len < n ? len : n - 1;
+        memcpy(dest, src, copy_len);
+        dest[copy_len] = 0;
+    }
+    return len;
+}
+
