0 Members and 4 Guests are viewing this topic.
Once we get a firm grasp on the USB hardware (apparently BrandonW is getting really close) it might be a good idea to try supporting USB audio.
--- old/binfmt_flat_mod.c 2012-02-12 20:25:14.000000000 +0100+++ binfmt_flat.c 2012-02-14 18:54:14.624405087 +0100@@ -15,40 +15,12 @@ * JAN/99 -- coded full program relocation ([email protected]) */ -#include <linux/module.h>-#include <linux/kernel.h>-#include <linux/sched.h>-#include <linux/mm.h>-#include <linux/mman.h>-#include <linux/errno.h>-#include <linux/signal.h>-#include <linux/string.h>-#include <linux/fs.h>-#include <linux/file.h>-#include <linux/stat.h>-#include <linux/fcntl.h>-#include <linux/ptrace.h>-#include <linux/user.h>-#include <linux/slab.h>-#include <linux/binfmts.h>-#include <linux/personality.h>-#include <linux/init.h>-#include <linux/flat.h> // This and arch/arm/include/asm/flat.h contain interesting stuff.-#include <linux/syscalls.h>--#include <asm/byteorder.h>-#include <asm/system.h>-#include <asm/uaccess.h>-#include <asm/unaligned.h>-#include <asm/cacheflush.h>-#include <asm/page.h>- /****************************************************************************/ // Until the code has production status... #define DEBUG 1 -// We'll probably want both compressed files, and bFLT libraries+// We want both compressed files, and bFLT libraries #define CONFIG_BINFMT_ZFLAT #define CONFIG_BINFMT_SHARED_FLAT @@ -96,27 +68,6 @@ static int load_flat_binary(struct linux_binprm *, struct pt_regs * regs); static int flat_core_dump(struct coredump_params *cprm); -// TODO REMOVE Linux-specific-static struct linux_binfmt flat_format = {- .module = THIS_MODULE,- .load_binary = load_flat_binary,- .core_dump = flat_core_dump,- .min_coredump = PAGE_SIZE-};--/****************************************************************************/-/*- * Routine writes a core dump image in the current directory.- * Currently only a stub-function.- */-// TODO REMOVE Linux-specific-static int flat_core_dump(struct coredump_params *cprm)-{- printk("Process %s:%d received signr %d and should have core dumped\n",- current->comm, current->pid, (int) cprm->signr);- return(1);-}- /****************************************************************************/ /* * create_flat_tables() parses the env- and arg-strings in new user@@ -550,10 +501,8 @@ */ DBG_FLT("BINFMT_FLAT: ROM mapping of file (we hope)\n"); - down_write(¤t->mm->mmap_sem); // TODO REMOVE textpos = do_mmap(bprm->file, 0, text_len, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_EXECUTABLE, 0); // TODO PORT we'll probably read everything to RAM- up_write(¤t->mm->mmap_sem); // TODO REMOVE if (!textpos || IS_ERR_VALUE(textpos)) { if (!textpos) textpos = (unsigned long) -ENOMEM;@@ -564,10 +513,8 @@ len = data_len + extra + MAX_SHARED_LIBS * sizeof(unsigned long); len = PAGE_ALIGN(len);- down_write(¤t->mm->mmap_sem); // TODO REMOVE realdatastart = do_mmap(0, 0, len, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 0); // TODO PORT we'll probably copy everything to RAM- up_write(¤t->mm->mmap_sem); // TODO REMOVE if (realdatastart == 0 || IS_ERR_VALUE(realdatastart)) { if (!realdatastart)@@ -611,10 +558,8 @@ len = text_len + data_len + extra + MAX_SHARED_LIBS * sizeof(unsigned long); len = PAGE_ALIGN(len);- down_write(¤t->mm->mmap_sem); // TODO REMOVE textpos = do_mmap(0, 0, len, PROT_READ | PROT_EXEC | PROT_WRITE, MAP_PRIVATE, 0); // TODO PORT we'll probably read everything to RAM- up_write(¤t->mm->mmap_sem); // TODO REMOVE if (!textpos || IS_ERR_VALUE(textpos)) { if (!textpos)@@ -962,16 +907,3 @@ return 0; }--/****************************************************************************/-// TODO REMOVE Linux-specific-static int __init init_flat_binfmt(void)-{- return register_binfmt(&flat_format);-}--/****************************************************************************/--core_initcall(init_flat_binfmt);--/****************************************************************************/
and I don't have time to undertake such a task alone - for a start, not this evening.