mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Booting mx25 based device from SD and NOR
@ 2012-05-22 12:11 Roberto Nibali
  2012-05-22 18:42 ` Sascha Hauer
  0 siblings, 1 reply; 24+ messages in thread
From: Roberto Nibali @ 2012-05-22 12:11 UTC (permalink / raw)
  To: barebox


[-- Attachment #1.1: Type: text/plain, Size: 4403 bytes --]

Hi

I have been trying to boot a customized mx25 based device using barebox and
I seem to be missing a few basic pointers, I believe, since it does not
work. I have attached my config and put my current patch-set online:
http://pastebin.com/KUVAwWRk. It's based on git commit 'dadcf5bd8f715'.

I don't know if the way of adding the boatloader to the SD card for later
installing it onto NOR flash is the correct one. I currently issue a:

sudo dd if=barebox.bin of=/dev/sdc bs=512 skip=2 seek=2 && sync

sdc being the SD card. I wonder if the environment has to be put somewhere
into a partition or if it can be glued into the barebox image. Because
loading the barebox.bin as a secondary stage bootloader from within uboot
version 2009.08 works somehow:

Board: SID1 NOAH
registered netconsole as cs1
imx-esdhc@mci0: registered as mci0
imx-esdhc@imx-esdhc0: timeout 1
Cannot reset the SD/MMC card
ehci@ehci0: USB EHCI 1.00
cfi_flash@cfi_flash0: found cfi flash at a0000000, size 67108864
Malloc space: 0x83b00000 -> 0x83efffff (size  4 MB)
Stack space : 0x83af8000 -> 0x83b00000 (size 32 kB)
envfs: wrong magic on /dev/env0
no valid environment found on /dev/env0. Using default environment
running /env/bin/init...

Hit any key to stop autoboot:  3

type update_kernel nor [<imagename>] to update kernel into flash
type update_root nor [<imagename>] to update rootfs into flash

sid1-noah:/
sid1-noah:/ devinfo
devices:
`---- net
`---- imx_serial0
     `---- cs0
`---- mem0
     `---- 0x00000000-0x03ffffff: /dev/ram0
`---- imx_iim0
     `---- 0x00000000-0x0000001f: /dev/imx_iim_bank0
     `---- 0x00000000-0x0000001f: /dev/imx_iim_bank1
     `---- 0x00000000-0x0000001f: /dev/imx_iim_bank2
     `---- 0x00000000-0x0000001f: /dev/imx_iim_bank3
     `---- 0x00000000-0x0000001f: /dev/imx_iim_bank4
     `---- 0x00000000-0x0000001f: /dev/imx_iim_bank5
     `---- 0x00000000-0x0000001f: /dev/imx_iim_bank6
     `---- 0x00000000-0x0000001f: /dev/imx_iim_bank7
`---- ramfs0
`---- devfs0
`---- mem1
     `---- 0x00000000-0x000017e7: /dev/defaultenv
`---- mem2
     `---- 0x00000000-0xfffffffe: /dev/mem
`---- cs1
`---- i2c-imx0
`---- imx-esdhc0
     `---- mci0
`---- fec_imx0
     `---- miidev0
          `---- 0x00000000-0x0000003f: /dev/phy0
     `---- eth0
`---- ehci0
`---- cfi_flash0
     `---- 0x00000000-0x03ffffff: /dev/nor0
     `---- 0x00000000-0x0003ffff: /dev/self
     `---- 0x00040000-0x0005ffff: /dev/env0
     `---- 0x00000000-0x0003ffff: /dev/nor0.barebox
     `---- 0x00040000-0x0005ffff: /dev/nor0.bareboxenv
     `---- 0x00060000-0x0035ffff: /dev/nor0.kernel
     `---- 0x00360000-0x03ffffff: /dev/nor0.root

drivers:
imx_serial
     ramfs
     devfs
       fat
      tftp
   imx_iim
   fec_imx
    miidev
 cfi_flash
    <NULL>
      ehci
      ohci
   imx_spi
   i2c-imx
       mci
 imx-esdhc
        fb
     imxfb
     at25x
       mem
    cramfs
sid1-noah:/ meminfo
max system bytes =     516096
system bytes     =     516096
in use bytes     =     495984
sid1-noah:/ iomem
0x00000000 - 0xfffffffe (size 0xffffffff) iomem
  0x43f80000 - 0x43f80fff (size 0x00001000) i2c-imx0
  0x43f90000 - 0x43f90fff (size 0x00001000) imx_serial0
  0x50038000 - 0x50038fff (size 0x00001000) fec_imx0
  0x53fb4000 - 0x53fb4fff (size 0x00001000) imx-esdhc0
  0x53ff0000 - 0x53ff0fff (size 0x00001000) imx_iim0
  0x53ff4500 - 0x53ff44ff (size 0x00000000) ehci0
  0x53ff4540 - 0x53ff453f (size 0x00000000) ehci0
  0x80000000 - 0x83ffffff (size 0x04000000) ram0
    0x83af8000 - 0x83afffff (size 0x00008000) stack
    0x83b00000 - 0x83efffff (size 0x00400000) malloc space
    0x83f00000 - 0x83f3fcf4 (size 0x0003fcf5) barebox
    0x83f42124 - 0x83f48688 (size 0x00006565) bss
  0xa0000000 - 0xa3ffffff (size 0x04000000) cfi_flash0
sid1-noah:/ cpufreq 532
Switched CPU frequency to 532MHz
sid1-noah:/ dump_clocks
mpll:     532000000 Hz
upll:     240000000 Hz
arm:      399000000 Hz
ahb:      133000000 Hz
uart:      33250000 Hz
gpt:       66500000 Hz
nand:      33250000 Hz
lcd:       66500000 Hz
i2c:      120000000 Hz
sdhc1:     66500000 Hz
sid1-noah:/ cpufreq 399
Switched CPU frequency to 399MHz
sid1-noah:/ dump_clocks
mpll:     399000000 Hz
upll:     240000000 Hz
arm:      299250000 Hz
ahb:       99750000 Hz
uart:      24937500 Hz
gpt:       49875000 Hz
nand:      24937500 Hz
lcd:       49875000 Hz
i2c:      120000000 Hz
sdhc1:     49875000 Hz

I'm glad for any pointers.

Best regards
Roberto

[-- Attachment #1.2: Type: text/html, Size: 6047 bytes --]

[-- Attachment #2: 0002-Default-config-file-for-NOAH.patch --]
[-- Type: application/octet-stream, Size: 2785 bytes --]

From 459856c3c98c8453e7d0e2f68b354e9817308458 Mon Sep 17 00:00:00 2001
From: Roberto Nibali <rnibali@gmail.com>
Date: Mon, 21 May 2012 12:38:24 +0200
Subject: [PATCH 2/6] Default config file for NOAH

---
 arch/arm/configs/noah_defconfig |   97 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 97 insertions(+)
 create mode 100644 arch/arm/configs/noah_defconfig

diff --git a/arch/arm/configs/noah_defconfig b/arch/arm/configs/noah_defconfig
new file mode 100644
index 0000000..152f0bf
--- /dev/null
+++ b/arch/arm/configs/noah_defconfig
@@ -0,0 +1,97 @@
+CONFIG_ARCH_IMX=y
+CONFIG_ARCH_IMX_EXTERNAL_BOOT=y
+CONFIG_ARCH_IMX25=y
+CONFIG_MACH_MX25_NOAH=y
+CONFIG_IMX_CLKO=y
+CONFIG_IMX_IIM=y
+CONFIG_AEABI=y
+CONFIG_ARM_UNWIND=y
+CONFIG_MMU=y
+CONFIG_BROKEN=y
+CONFIG_EXPERIMENTAL=y
+CONFIG_PROMPT="sid1-noah:"
+CONFIG_LONGHELP=y
+CONFIG_GLOB=y
+CONFIG_CMDLINE_EDITING=y
+CONFIG_AUTO_COMPLETE=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
+CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/fq-sid1-mx25-noah/env"
+CONFIG_BAREBOXENV_TARGET=y
+CONFIG_ENABLE_FLASH_NOISE=y
+CONFIG_ENABLE_PARTITION_NOISE=y
+CONFIG_ENABLE_DEVICE_NOISE=y
+CONFIG_CMD_EDIT=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_EXPORT=y
+CONFIG_CMD_PRINTENV=y
+CONFIG_CMD_READLINE=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_AUTOMOUNT=y
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_LOADB=y
+CONFIG_CMD_LOADY=y
+CONFIG_CMD_LOADS=y
+CONFIG_CMD_SAVES=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_IOMEM=y
+CONFIG_CMD_MD5SUM=y
+CONFIG_CMD_SHA1SUM=y
+CONFIG_CMD_SHA256SUM=y
+CONFIG_CMD_SHA224SUM=y
+CONFIG_CMD_MTEST=y
+CONFIG_CMD_MTEST_ALTERNATIVE=y
+CONFIG_CMD_FLASH=y
+CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_BOOTM_VERBOSE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_BOOTM_OFTREE=y
+CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
+CONFIG_CMD_UIMAGE=y
+CONFIG_CMD_RESET=y
+CONFIG_CMD_GO=y
+CONFIG_CMD_OFTREE=y
+CONFIG_CMD_TIMEOUT=y
+CONFIG_CMD_PARTITION=y
+CONFIG_CMD_MAGICVAR=y
+CONFIG_CMD_MAGICVAR_HELP=y
+CONFIG_CMD_BMP=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_UNCOMPRESS=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_LED=y
+CONFIG_NET=y
+CONFIG_NET_DHCP=y
+CONFIG_NET_NFS=y
+CONFIG_NET_PING=y
+CONFIG_NET_TFTP=y
+CONFIG_NET_TFTP_PUSH=y
+CONFIG_NET_NETCONSOLE=y
+CONFIG_NET_RESOLV=y
+CONFIG_DRIVER_NET_FEC_IMX=y
+CONFIG_DRIVER_SPI_IMX=y
+CONFIG_I2C=y
+CONFIG_I2C_IMX=y
+CONFIG_DRIVER_CFI=y
+# CONFIG_DRIVER_CFI_BANK_WIDTH_1 is not set
+# CONFIG_DRIVER_CFI_BANK_WIDTH_4 is not set
+CONFIG_MTD=y
+CONFIG_USB=y
+CONFIG_USB_EHCI=y
+CONFIG_USB_OHCI=y
+CONFIG_USB_STORAGE=y
+CONFIG_VIDEO=y
+CONFIG_DRIVER_VIDEO_IMX=y
+CONFIG_MCI=y
+CONFIG_MCI_STARTUP=y
+CONFIG_MCI_IMX_ESDHC=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_EEPROM_AT25=y
+CONFIG_FS_CRAMFS=y
+CONFIG_FS_TFTP=y
+CONFIG_FS_FAT=y
+CONFIG_FS_FAT_WRITE=y
+CONFIG_FS_FAT_LFN=y
+CONFIG_BZLIB=y
+CONFIG_LZO_DECOMPRESS=y
-- 
1.7.9.5


[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2012-06-05  7:10 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-22 12:11 Booting mx25 based device from SD and NOR Roberto Nibali
2012-05-22 18:42 ` Sascha Hauer
2012-05-23 10:43   ` Roberto Nibali
2012-05-23 11:47     ` Eric Bénard
2012-05-24 12:49       ` Roberto Nibali
2012-05-24 12:58         ` Eric Bénard
2012-05-24 13:18           ` Roberto Nibali
2012-05-24 13:31             ` Eric Bénard
2012-05-25  9:04               ` Roberto Nibali
2012-05-25 10:08                 ` Eric Bénard
2012-05-29  9:06                   ` Roberto Nibali
2012-05-29  9:29                     ` Sascha Hauer
2012-05-29  9:56                       ` Roberto Nibali
2012-05-29 10:14                         ` Roberto Nibali
2012-05-30  5:47                           ` Sascha Hauer
2012-05-30  6:39                             ` Juergen Beisert
2012-05-31 13:12                             ` Roberto Nibali
2012-05-31 17:06                               ` Sascha Hauer
2012-06-01 10:25                                 ` Roberto Nibali
2012-06-05  7:09                                   ` Sascha Hauer
2012-05-24 17:17             ` Sascha Hauer
2012-05-25  9:19               ` Roberto Nibali
2012-05-25 10:01                 ` Sascha Hauer
2012-05-29  9:26                   ` Roberto Nibali

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox