AnsweredAssumed Answered

Problem to change bootloader from barebox

Question asked by victorien on Aug 20, 2014


I'm developing a board with an imx28 processor and I use barebox + linux 2.6.35 for the software.

I try to upload the bootloader from barebox shell with tftp but it doesn't work

barebox@IMX28:/ tftp /dev/null

could not open /dev/null: No space left on device

boot0 is a partition on a SPI flash memory. I have the same if I try to write the file to /dev/null or /dev/disk0.0 (disk0.0 is the boot partition when I work with an sd card)

I Can write the boort file to the spi flash from linux without problem.

here is the configuration of the memory on barebox :


#define BOOT_FROM_SPI 1

static struct flash_platform_data spi_flash = {
      .name = "nor-spi",    /* Cdev name, optional */
      .type = "m25p32",  /* Device type, required for non JEDEC chips */

static const struct spi_board_info mx28_misu_spi_board_info[] = {
        .name = "m25p80",
         * we leave this with the lower frequency
         * as the ssp unit otherwise locks up
        .max_speed_hz = 20000000,
        .bus_num = 2,
        .chip_select = 0,
        .bits_per_word = 8,
        .mode = SPI_MODE_0,
        .platform_data = &spi_flash,



add_generic_device("mxs_spi", 2, NULL, IMX_SSP2_BASE, 0x2000,
                              IORESOURCE_MEM, NULL);
devfs_add_partition("nor-spi0", 0x000000, 0x200000, DEVFS_PARTITION_FIXED, "boot0");

               cdev = devfs_add_partition("nor-spi0", 0x200000, 0x200000, DEVFS_PARTITION_FIXED, "env0");
               if (IS_ERR(cdev))
                              pr_err("Cannot create env0 on spi flash\n");
                              pr_info("environment storage is on spi flash\n");
else {
               ret = envfs_register_partition("disk0", 1);
               if (ret != 0)
                              pr_err("Cannot create the 'env0' persistent "
                                        "environment storage (%d)\n", ret);


Is there someone who can help me ?

Best regards.