summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
...
* | | command: add missing EXPORT_SYMBOL for find_cmdJean-Christophe PLAGNIOL-VILLARD2012-07-251-0/+1
| | | | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | version: add missing EXPORT_SYMBOL for version_stringJean-Christophe PLAGNIOL-VILLARD2012-07-251-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | complete: add missing EXPORT_SYMBOL for {command, device, empty, ↵Jean-Christophe PLAGNIOL-VILLARD2012-07-251-0/+4
| |/ |/| | | | | | | | | | | command}_var_complete Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | filetype: add forgotten mips barebox filetype_strAntony Pavlov2012-07-161-0/+1
|/ | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/resource-size'Sascha Hauer2012-07-023-18/+22
|\ | | | | | | | | | | Conflicts: drivers/base/resource.c fs/fs.c
| * resource: store 'end' instead of 'size' in struct resourceSascha Hauer2012-07-013-18/+22
| | | | | | | | | | | | | | | | | | | | Storing the size instead of the resource end in struct resource was a mistake. 'size' ranges from 0 to UINT[32|64]_MAX + 1 which obviously leads to problems. 'end' on the other hand will never exceed UINT[32|64]_MAX. Also this way we can express a iomem region covering the whole address space. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/menu'Sascha Hauer2012-07-022-19/+26
|\ \
| * | menu: implement KEY_HOME/KEY_ENDSascha Hauer2012-06-301-0/+9
| | | | | | | | | | | | | | | | | | To go to the first/last menu entry. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | menu: store repaint state in variableSascha Hauer2012-06-301-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | Instead of calling print_menu_entry multiple times in each case, store the repaint state in a variable and call it once at the end to save a few bytes of binary space. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | menu: use read_keySascha Hauer2012-06-301-13/+4
| | | | | | | | | | | | | | | | | | | | | We have the read_key function which reads a key and parses escape sequences. Use it in the menu instead of reimplementing this manually. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | complete: fix parameter complete with multiple '.'Sascha Hauer2012-06-301-1/+1
| |/ | | | | | | | | | | | | When a device parameter has dots in its name, we have to use strchr instead of strrchr, because the devicename ends at the first dot, not at the last one. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/size-decrease'Sascha Hauer2012-07-022-56/+16
|\ \
| * | dos partitions: enable disk size guessing only for bios disksSascha Hauer2012-06-281-1/+1
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | menu: factor out a function to print an entrySascha Hauer2012-06-281-55/+15
| |/ | | | | | | | | | | To save a few bytes of binary space. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/sparse'Sascha Hauer2012-07-022-7/+7
|\ \
| * | of: Fix usage of 0 as NULL pointerSascha Hauer2012-06-301-1/+1
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | tlsf: Use NULL instead of 0 for returning NULL pointersSascha Hauer2012-06-301-6/+6
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2012-07-021-1/+1
|\ \
| * | common: fix typo cammand_var_completeSteffen Trumtrar2012-06-301-1/+1
| |/ | | | | | | | | | | | | Change function name to command_var_complete in all calls and its declaration. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/dma-cache-align'Sascha Hauer2012-07-022-5/+7
|\ \
| * | partition: Use dma_alloc for allocating buffersSascha Hauer2012-06-301-2/+3
| | | | | | | | | | | | | | | | | | | | | Drivers may use dma to transfer blocks, so put them into dma save memory. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | block: use dma_alloc to allocate buffersSascha Hauer2012-06-301-3/+4
| |/ | | | | | | | | | | | | Drivers may use dma to transfer blocks, so put them into dma save memory. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | partitions: Make 64bit capableSascha Hauer2012-06-301-29/+0
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | make cdev 64bit capableSascha Hauer2012-06-301-1/+1
| | | | | | | | | | | | Next step to 64bit support: Make cdev size a 64bit type. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | use loff_t for file offsetsSascha Hauer2012-06-301-2/+2
|/ | | | | | | This is a first step for 64bit file support: Make the file sizes/offsets 64bit. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Fix a panic in crypto hash calculations due to uninitialized variable.Krzysztof Halasa2012-06-071-1/+1
| | | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* block: Fix printf warningAlexander Shiyan2012-05-311-1/+1
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* block: do not BUG() on failed block_getSascha Hauer2012-05-301-1/+1
| | | | | | | It does not necessarily means a bug when block_get fails here, this can also be a failure on the underlying device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* block: propagate error code from block_getSascha Hauer2012-05-301-13/+13
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* hush: do not convert to return code too earlySascha Hauer2012-05-231-5/+11
| | | | | | | | | | | | | | | | | parse_stream_outer used to convert a exit value to a return code, but parse_stream_outer maybe inside a recursion. This means that the exit status is lost in this case. Test case: if [ 0 = 0 ]; then false exit $? fi echo "shouldn't be here" Without this patch "shouldn't be here" will be printed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'pu/hush' into nextSascha Hauer2012-05-231-4/+6
|\
| * run_shell: run again on ctrl-cSascha Hauer2012-05-211-4/+6
| | | | | | | | | | | | | | | | We can start a new interactive shell now using the 'sh' command on the command line. This shell exits on ctrl-c though. Add a loop around it to continue instead of exiting. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | common: Make MENU depend on PROCESS_ESCAPE_SEQUENCEAlan Ott2012-05-211-0/+1
| | | | | | | | | | | | | | print_menu_entry() in common/menu.c depeneds on process_escape_sequence(). Signed-off-by: Alan Ott <alan@signal11.us> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Add next generation default environment templateSascha Hauer2012-05-182-3/+23
|/ | | | | | | | | | | | | | | | | | | | This adds a new environment template which aims to be more flexible and configurable. Instead of having mainly two scripts (a config script and a boot script) this template uses initscripts which control the startup behaviour and configuration. Also we have boot scripts in /env/boot which configure a single boot configuration. Additional boot entries can be added by board specific entries or during runtime by copying and editing a template entry. Some more helpers handle for example network interfaces which can now be brought up with 'ifup'. We use the automount feature to configure mountpoints together with the commands to bring up the devices behind these mountpoints. Optionally menu support is available which hides many details behind a nice looking interface. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'master' into nextSascha Hauer2012-05-164-5/+11
|\
| * complete: fix duplicate env eval listJean-Christophe PLAGNIOL-VILLARD2012-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this can be reproductable by this sequence barebox:/ <TAB> . ? [ addpart bootm cat cd clear cp cpuinfo crc32 delpart devinfo dhcp echo edit erase ethact exit export false getopt go help host loadb loadenv loady login ls md md5sum memcmp memcpy meminfo memset menu mkdir mount mtest mw nfs passwd ping printenv protect pwd readline reset rm rmdir saveenv sedit sh sha1sum sha256sum sleep source test tftp time timeout true umount uncompress unprotect version net.nameserver= net.domainname= cs0.baudrate= cs0.active= cs1.active= cs1.ip= cs1.port= barebox:/ $<TAB> $net.nameserver $net.domainname $cs0.baudrate $cs0.active $cs1.active $cs1.ip $cs1.port $net.nameserver $net.domainname $cs0.baudrate $cs0.active $cs1.active $cs1.ip $cs1.port barebox:/ $ Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Merge branch 'next'Sascha Hauer2012-05-0312-3621/+864
| |\ | | | | | | | | | | | | | | | | | | Conflicts: common/hush.c Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | uimage/file_to_sdram: fix resource allocationSascha Hauer2012-05-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | file_to_sdram is used to load an initrd. The resource size is then used to pass the initrd size to Linux. This means that the resource size must exactly match the initrd size. Currently this is not the case since we request the sdram region in chunks of 8 Kbytes. Fix this by adjusting the resource size when the file is loaded. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | hush: bail out of scripts on syntax errorSascha Hauer2012-05-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a systax error we have to bail out of the shell instead of setting inp->p to NULL and crash barebox with a NULL pointer deref. This only happened in scripts. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> This fixes the problem I had (i.e. a boot loop caused by a stray fi in /env/bin/init). Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
| * | Merge tag 'j-master-fixes' of git://git.jcrosoft.org/bareboxSascha Hauer2012-04-301-2/+7
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Master Fixes usb driver name (driver_d) Menu fixes
| | * | menu: fix support for "\n", "\n\r" and "\r"Jean-Christophe PLAGNIOL-VILLARD2012-04-251-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | If "\n\r" or "\r\n" is ignore one. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | * | menu: fix double action when "\n\r" or "\r\n" is receivedJean-Christophe PLAGNIOL-VILLARD2012-04-251-2/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | common: memory: fix off-by-one in tlsf_createMarc Kleine-Budde2012-04-241-1/+1
| |/ / | | | | | | | | | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'pu/magicvar' into nextSascha Hauer2012-05-151-0/+4
|\ \ \
| * | | flexible bootargs: Add magicvar descriptionsSascha Hauer2012-05-151-0/+4
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | glob: Add sorted output supportSascha Hauer2012-05-141-1/+7
|/ / / | | | | | | | | | | | | | | | | | | This allows us for example to execute init scripts in the correct order. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | booting: more flexible Linux bootargs generationSascha Hauer2012-05-143-1/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use the environment variable 'bootargs' to get the Linux bootargs. This patch allows for a more flexible bootargs generation using global variables. With it the Linux bootargs are concatenated from multiple variables. This allows to replace parts of the bootargs string without having to reconstruct it completely. With this bootargs can be constructed like: global linux.bootargs.base="console=ttyS0,115200" global linux.bootargs.ip="ip=dhcp" global linux.mtdparts="physmap-flash.0:512K(nor0.barebox),-(root)" This will then automatically be combined into a kernel bootargs string during boot. If the 'linux.bootargs.' variables are all empty the old standard 'bootargs' way will be used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | add 'global' commandSascha Hauer2012-05-143-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements global shell variable support. This is done by registering a new device named 'global', so global variables are just plain device parameters. Global variables are useful for storing the global state in the environment. Currently we do this by sourcing scripts instead of executing them which is quite limiting. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Make errno a positive valueSascha Hauer2012-05-143-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Normally errno contains a positive error value. A certain unnamed developer mixed this up while implementing U-Boot-v2. Also, normally errno is never set to zero by any library function. This patch fixes this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | MIPS: bootm: add "MIPS barebox" handlerAntony Pavlov2012-05-111-0/+2
| |/ |/| | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>