'embarcado' Category
-
abr132011
avoid kernel messages at boottime
Linux embedded normally don’t behave as the same in desktop system, maybe instead login at your device you need only run a specific application – for example – by just modifying an start script. Although easily… one requisite that I faced these days was avoid boot messages from kernel, accomplished by changing kernel parameters:
setenv bootargs [...] -
jan112011
re-generating ubi
If you need re-generate an UBIFS and don’t know the right parameters you can inspect dmesg output to filter UBI parameters.
If you need know the steps to creante an UBI/UBIFS check the official documentation or my ubifs tag on del.icio.us.
-
nov192010
using ubi on u-boot: compiling issues
if you are adding support to ubifs on u-boot, you must add some include/configs/<CONFIG>.h
#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_RBTREE
#define CONFIG_LZO
to avoid errors like:
/uboot-imx/fs/ubifs/tnc.c:105: undefined reference to `rb_insert_color’
fs/ubifs/libubifs.a(orphan.o): In function `insert_dead_orphan’:
/uboot-imx/fs/ubifs/orphan.c:129: undefined reference to `rb_insert_color’
fs/ubifs/libubifs.a(recovery.o): In function `add_ino’:
/uboot-imx/fs/ubifs/recovery.c:1050: undefined reference to `rb_insert_color’
fs/ubifs/libubifs.a(recovery.o): In function `remove_ino’:
/uboot-imx/fs/ubifs/recovery.c:1088: undefined reference to `rb_erase’
fs/ubifs/libubifs.a(recovery.o): In function `ubifs_recover_size’:
/uboot-imx/fs/ubifs/recovery.c:1171: undefined reference to `rb_first’
/uboot-imx/fs/ubifs/recovery.c:1214: undefined [...] -
nov082010
linux booting on ubifs partitions
UBIFS is relatively new on embedded systems but my guess is that they’ll become the standard on embedded market. To start, the first step is enable UBIFS support in kernel. I exaggerated on some debug options, fell free to avoid:
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_RESERVE=1
CONFIG_MTD_UBI_DEBUG=y
CONFIG_MTD_UBI_DEBUG_MSG=y
CONFIG_UBIFS_FS=y
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_ZLIB=y
Next I used a simple rootfs – basically busybox + mtd-utils – to create/format the partitions, [...] -
nov032010
mtd partitions: tips
there are two tips when initializing MTD partition struct:
use MTDPART_OFS_APPEND to define .offset
1024 multiple to .size (4MB = 4194304 bytes or 4 * 1024 * 1024)static struct mtd_partition nand_flash_partitions[] = {
{
.name = “bootloader”,
.offset = 0,
.size = 3 * 1024 * 1024},
{
.name = “nand.kernel”,
.offset = MTDPART_OFS_APPEND,
.size = 5 * 1024 * 1024},
{
.name = “nand.rootfs”,
.offset = [...] -
out262010
using ubi on u-boot: part one
UBI stands for Unsorted Block Images. The shortest description for UBI is “LVM for NAND flash memory devices” and if you don’t know yet how it’s works I recommend check this presentation. I intend here describe my use with u-boot, starting with the steps to flash an kernel image. First of all, if you not [...]
-
out082010
accessing u-boot with picocom to transfer files via serial interface
There is a how-to with minicom too, this is using picocom to transfer files via serial interface (ymodem). First start with some parameters, in this case I’m using ttyUSB0.
$ picocom –baud 115200 –send-cmd=”sb -vv” –receive-cmd=”rb -vvv” /dev/ttyUSB0
Then:
U-Boot > loady
## Ready for binary (ymodem) download to 0×90800000 at 115200 bps…
Type C-a C-s and choose the file.
*** [...] -
set082010
Installing Buildroot toolchain for Nuttx
On my previous post I discussed some stats using Buildroot toolchain to build Nuttx. Today I’ll add the necessary steps to build on Ubuntu. Ubuntu is de-facto GNU/Linux distribution (although I’m Gentoo user) and many users, from different areas, uses it [they are not necessary command line experts] so I decided to publish my raw [...]