* Beagleboard and barebox problem @ 2010-10-21 17:55 Victor Rodriguez 2010-10-22 7:05 ` Sascha Hauer 0 siblings, 1 reply; 6+ messages in thread From: Victor Rodriguez @ 2010-10-21 17:55 UTC (permalink / raw) To: barebox Hey I am new on bare box I have download it from git repo and when I make the barebox.bin with omap3530_beagle_defconfig this is the output Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24) Reading boot sector Loading u-boot.bin from mmc barebox 2010.10.0-00086-ga14c018 (Oct 21 2010 - 12:19:10) Board: Texas Instrument's Beagle I2C probe i2c-omap@i2c-omap0: bus 0 rev3.12 at 100 kHz ehci@ehci0: USB EHCI 1.00 NAND device: Manufacturer ID: 0x2c, Chip ID: 0xba (Micron NAND 256MiB 1,8V 16-bit) Malloc space: 0x80c00000 -> 0x81000000 (size 4 MB) Stack space : 0x80bf8000 -> 0x80c00000 (size 32 kB) Open /dev/env0 No such file or directory running /env/bin/init... not found barebox> ls . .. dev barebox> ls /dev/ zero mem ram0 twl4030 nand0 nand_oob0 And when I compile with omap3530_beagle_per_uart_defconfig This is the output Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24) Reading boot sector Loading u-boot.bin from mmc barebox 2010.10.0-00086-ga14c018 (Oct 21 2010 - 12:41:33) Board: Texas Instrument's Beagle Malloc space: 0x87bfff10 -> 0x87ffff10 (size 4 MB) Stack space : 0x87bf7f10 -> 0x87bfff10 (size 32 kB) running /env/bin/init... not found X-load Beagle>ls Unknown command 'ls' X-load Beagle>help Unknown command 'help' And the same to all the commands What I am looking for is to use bare box with MMC, the kernel image and the File System are on the MMC on different partitions, I have tested them and work perfect with the traditioanl u-boot. I really want to try this new boat loader Thanks Victor Rodriguez _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Beagleboard and barebox problem 2010-10-21 17:55 Beagleboard and barebox problem Victor Rodriguez @ 2010-10-22 7:05 ` Sascha Hauer 2010-10-25 22:29 ` Victor Rodriguez 0 siblings, 1 reply; 6+ messages in thread From: Sascha Hauer @ 2010-10-22 7:05 UTC (permalink / raw) To: Victor Rodriguez; +Cc: barebox Hi Victor, On Thu, Oct 21, 2010 at 12:55:16PM -0500, Victor Rodriguez wrote: > Hey I am new on bare box I have download it from git repo and when I > make the barebox.bin with omap3530_beagle_defconfig this is the output > > Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24) > Reading boot sector > Loading u-boot.bin from mmc > > > barebox 2010.10.0-00086-ga14c018 (Oct 21 2010 - 12:19:10) > > Board: Texas Instrument's Beagle > I2C probe > i2c-omap@i2c-omap0: bus 0 rev3.12 at 100 kHz > ehci@ehci0: USB EHCI 1.00 > NAND device: Manufacturer ID: 0x2c, Chip ID: 0xba (Micron NAND 256MiB > 1,8V 16-bit) > Malloc space: 0x80c00000 -> 0x81000000 (size 4 MB) > Stack space : 0x80bf8000 -> 0x80c00000 (size 32 kB) > Open /dev/env0 No such file or directory > running /env/bin/init... > not found > barebox> ls > . .. dev > barebox> ls /dev/ > zero mem ram0 twl4030 nand0 > nand_oob0 Then it's up and running, congratulations ;) What the beagle board is missing is currently a place to store the environment. You could add an environment to nand by adding something like this to the board setup function: devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED,"env_raw"); dev_add_bb_dev("env_raw", "env0"); (this adds a partition at offset 0x40000 and size 0x20000 to nand, you probably have to adjust the offset to not overwrite the X-loader) Another possibility would be to add mmc support for omap and put the environment there. We recently gained mmc support for barebox, so all that's missing is an omap driver. The mmc support is still close to U-Boot, so the driver won't need many changes. > > > And when I compile with omap3530_beagle_per_uart_defconfig The per_uart_defconfig is more a X-loader replacement. You can use it to bootstrap from the serial port. For your case the other config is the correct one. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Beagleboard and barebox problem 2010-10-22 7:05 ` Sascha Hauer @ 2010-10-25 22:29 ` Victor Rodriguez 2010-10-26 3:39 ` Sascha Hauer 0 siblings, 1 reply; 6+ messages in thread From: Victor Rodriguez @ 2010-10-25 22:29 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox On Fri, Oct 22, 2010 at 2:05 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > Hi Victor, > > On Thu, Oct 21, 2010 at 12:55:16PM -0500, Victor Rodriguez wrote: >> Hey I am new on bare box I have download it from git repo and when I >> make the barebox.bin with omap3530_beagle_defconfig this is the output >> >> Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24) >> Reading boot sector >> Loading u-boot.bin from mmc >> >> >> barebox 2010.10.0-00086-ga14c018 (Oct 21 2010 - 12:19:10) >> >> Board: Texas Instrument's Beagle >> I2C probe >> i2c-omap@i2c-omap0: bus 0 rev3.12 at 100 kHz >> ehci@ehci0: USB EHCI 1.00 >> NAND device: Manufacturer ID: 0x2c, Chip ID: 0xba (Micron NAND 256MiB >> 1,8V 16-bit) >> Malloc space: 0x80c00000 -> 0x81000000 (size 4 MB) >> Stack space : 0x80bf8000 -> 0x80c00000 (size 32 kB) >> Open /dev/env0 No such file or directory >> running /env/bin/init... >> not found >> barebox> ls >> . .. dev >> barebox> ls /dev/ >> zero mem ram0 twl4030 nand0 >> nand_oob0 > > Then it's up and running, congratulations ;) > > What the beagle board is missing is currently a place to store the > environment. You could add an environment to nand by adding something > like this to the board setup function: > > devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED,"env_raw"); > dev_add_bb_dev("env_raw", "env0"); > > (this adds a partition at offset 0x40000 and size 0x20000 to nand, you > probably have to adjust the offset to not overwrite the X-loader) HI Sascha thanks a lot for the help Well after adding the environment for nand by adding this code : arch/arm/boards/omap/board-beagle.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/arch/arm/boards/omap/board-beagle.c b/arch/arm/boards/omap/board-beagle.c index 6de2cce..21b31c2 100644 --- a/arch/arm/boards/omap/board-beagle.c +++ b/arch/arm/boards/omap/board-beagle.c @@ -73,6 +73,8 @@ #include <linux/err.h> #include <usb/ehci.h> #include "board.h" +#include <partition.h> +#include <nand.h> /******************** Board Boot Time *******************/ @@ -334,6 +336,16 @@ static int beagle_devices_init(void) #endif gpmc_generic_nand_devices_init(0, 16, 1); + /* ----------- add some vital partitions -------- */ +#ifdef CONFIG_NAND + + devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, "env_raw"); + dev_add_bb_dev("env_raw", "env0"); +#endif + + + + armlinux_add_dram(&sdram_dev); armlinux_set_bootparams((void *)0x80000100); armlinux_set_architecture(MACH_TYPE_OMAP3_BEAGLE); -- 1.7.0.4 barebox compiles fine (Hope it could be a patch if you consider I could send this tiny patch to the mailing list :) ) And the output for the new boat loader is Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24) Reading boot sector Loading u-boot.bin from mmc bare box 2010.10.0-00088-gd3ddbec (Oct 25 2010 - 16:36:06) Board: Texas Instrument's Beagle I2C probe i2c-omap@i2c-omap0: bus 0 rev3.12 at 100 kHz ehci@ehci0: USB EHCI 1.00 NAND device: Manufacturer ID: 0x2c, Chip ID: 0xba (Micron NAND 256MiB 1,8V 16-bit) Malloc space: 0x80c00000 -> 0x81000000 (size 4 MB) Stack space : 0x80bf8000 -> 0x80c00000 (size 32 kB) envfs: wrong magic on /dev/env0 running /env/bin/init... not found barebox> / I fix the problem of envfs: wrong magic on /dev/env0 with your thread http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg10197.html And every thing works fine uboot> addpart /dev/nand0 256k(uboot),128k(env),2048k(kernel),-(rootfs) uboot> nand -a /dev/nand0.* uboot> erase /dev/nand0.kernel.bb and in the end I have barebox> /dev ls -la ls: invalid option -- a cr-------- 4294967295 zero crw------- 4294967295 mem crw------- 134217728 ram0 crw------- 1024 twl4030 crw------- 268435456 nand0 cr-------- 8388608 nand_oob0 crw------- 131072 env_raw crw------- 131072 env0 crw------- 262144 nand0.uboot crw------- 131072 nand0.env crw------- 2097152 nand0.kernel crw------- 265945088 nand0.rootfs crw------- 265945088 nand0.rootfs.bb crw------- 2097152 nand0.kernel.bb crw------- 131072 nand0.env.bb crw------- 262144 nand0.uboot.bb So every thing works fine :) But I have a question how do I save the bootargs My boot args used to be setenv bootargs console=ttyS2,115200n8 noinitrd root=/dev/mmcblk0p2 rootfstype=ext2 rw rootdelay=1 nohz=off But is not working for bare box How do you save the boot args ? The next step will be uboot> tftp uImage-mx27ads /dev/nand0.kernel.bb And the same for a ram disk File System in the nand0.rootfs.bb right ? And uboot> bootm /dev/nand0.kernel.bb But my second question is How the kernel know were is the File System, where should I set something similar to boot args ? Thanks for the help it really helps me a lot > Another possibility would be to add mmc support for omap and put the > environment there. We recently gained mmc support for barebox, so all > that's missing is an omap driver. The mmc support is still close to > U-Boot, so the driver won't need many changes. I will try to do this hope it could help some one else. Sincerely yours Victor Rodriguez >> >> >> And when I compile with omap3530_beagle_per_uart_defconfig > > The per_uart_defconfig is more a X-loader replacement. You can use it to > bootstrap from the serial port. For your case the other config is the > correct one. > > Sascha > > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Beagleboard and barebox problem 2010-10-25 22:29 ` Victor Rodriguez @ 2010-10-26 3:39 ` Sascha Hauer 2010-10-26 4:07 ` Victor Rodriguez 0 siblings, 1 reply; 6+ messages in thread From: Sascha Hauer @ 2010-10-26 3:39 UTC (permalink / raw) To: Victor Rodriguez; +Cc: barebox Hi Victor, > I fix the problem of envfs: wrong magic on /dev/env0 with your thread > > http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg10197.html > > And every thing works fine > > uboot> addpart /dev/nand0 256k(uboot),128k(env),2048k(kernel),-(rootfs) I think on the beagle board the first space in Nand is occupied by the xloader and xloader itself expects the second stage loader at offset 512k, but I don't know the exact situation off my head. Michael, maybe you can comment on this? > > setenv bootargs console=ttyS2,115200n8 noinitrd root=/dev/mmcblk0p2 > rootfstype=ext2 rw rootdelay=1 nohz=off > > But is not working for bare box > > How do you save the boot args ? have a look at /env/config (using the edit command). Every file there is saved into the environment using saveenv. > > The next step will be > > uboot> tftp uImage-mx27ads /dev/nand0.kernel.bb > > And the same for a ram disk File System in the nand0.rootfs.bb right ? Right, dont forget to erase the partitions with 'erase /dev/nand0.kernel.bb' beforehand, otherwise you'll have garbage in your nand. > > And > > uboot> bootm /dev/nand0.kernel.bb In principle, yes. The normal process is to simply run 'boot' which is a script under /env/bin. This will setup things like the commandline correctly. > > But my second question is How the kernel know were is the File > System, where should I set something similar to boot args ? Have a look at the files under /env, I think this will answer your questions (we have ls, cat and edit for this). I'm sorry the situation on the beagle board is still a bit rough and unclear. I hope we find time working on this. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Beagleboard and barebox problem 2010-10-26 3:39 ` Sascha Hauer @ 2010-10-26 4:07 ` Victor Rodriguez 2010-10-26 18:34 ` Sascha Hauer 0 siblings, 1 reply; 6+ messages in thread From: Victor Rodriguez @ 2010-10-26 4:07 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox On Mon, Oct 25, 2010 at 10:39 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > Hi Victor, > >> I fix the problem of envfs: wrong magic on /dev/env0 with your thread >> >> http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg10197.html >> >> And every thing works fine >> >> uboot> addpart /dev/nand0 256k(uboot),128k(env),2048k(kernel),-(rootfs) > > I think on the beagle board the first space in Nand is occupied by the > xloader and xloader itself expects the second stage loader at offset > 512k, but I don't know the exact situation off my head. Michael, maybe > you can comment on this? > >> >> setenv bootargs console=ttyS2,115200n8 noinitrd root=/dev/mmcblk0p2 >> rootfstype=ext2 rw rootdelay=1 nohz=off >> >> But is not working for bare box >> >> How do you save the boot args ? > > have a look at /env/config (using the edit command). Every file there is > saved into the environment using saveenv. > >> >> The next step will be >> >> uboot> tftp uImage-mx27ads /dev/nand0.kernel.bb >> >> And the same for a ram disk File System in the nand0.rootfs.bb right ? > > Right, dont forget to erase the partitions with 'erase > /dev/nand0.kernel.bb' beforehand, otherwise you'll have garbage in your > nand. You mean to erase the part of the nand where the kernel is saved before copy the ramdisk to its partition? or before i run the 'boot' comand ? >> >> And >> >> uboot> bootm /dev/nand0.kernel.bb > > In principle, yes. The normal process is to simply run 'boot' which is a > script under /env/bin. This will setup things like the commandline > correctly. > >> >> But my second question is How the kernel know were is the File >> System, where should I set something similar to boot args ? > > Have a look at the files under /env, I think this will answer your > questions (we have ls, cat and edit for this). > > I'm sorry the situation on the beagle board is still a bit rough and > unclear. I hope we find time working on this. Yes I could give some free time to work on this :) but could you please give me more information about the mmc dirver I am new on barebox but I would like to help to improve it :) Which other board is using this MMC driver ? I can check the code. The problem is that beagle board is much more familiar with booting by mmc because it does not have any RJ45 connector in order to transfer by TFTP or NFS the uImage. By the way about the small piece of code for the beagle board nand. Do you consider that is good enough for an small patch ? Thanks a lot Sincerely yours Victor Rodriguez > Sascha > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Beagleboard and barebox problem 2010-10-26 4:07 ` Victor Rodriguez @ 2010-10-26 18:34 ` Sascha Hauer 0 siblings, 0 replies; 6+ messages in thread From: Sascha Hauer @ 2010-10-26 18:34 UTC (permalink / raw) To: Victor Rodriguez; +Cc: barebox On Mon, Oct 25, 2010 at 11:07:21PM -0500, Victor Rodriguez wrote: > On Mon, Oct 25, 2010 at 10:39 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > > Hi Victor, > > > > Right, dont forget to erase the partitions with 'erase > > /dev/nand0.kernel.bb' beforehand, otherwise you'll have garbage in your > > nand. > > You mean to erase the part of the nand where the kernel is saved > before copy the ramdisk to its partition? or before i run the 'boot' > comand ? You have to erase the Nand before writing to it. (though I wonder if that behaviour should be changed). > > > > I'm sorry the situation on the beagle board is still a bit rough and > > unclear. I hope we find time working on this. > > > Yes I could give some free time to work on this :) but could you > please give me more information about the mmc dirver I am new on > barebox but I would like to help to improve it :) Great ;) > > Which other board is using this MMC driver ? I can check the code. Currently there is no Omap MMC support in barebox. The path to go would be to copy the Omap MMC driver from U-Boot and bash onto it until it runs. For a clue what has to be changed in this driver you might want to look at a diff between the i.MX esdhc driver inU-Boot and barebox. > > The problem is that beagle board is much more familiar with booting by > mmc because it does not have any RJ45 connector in order to transfer > by TFTP or NFS the uImage. > > By the way about the small piece of code for the beagle board nand. Do > you consider that is good enough for an small patch ? I think at least the offset of the environment has to be moved. AFAIK the first 768k in Nand is used for the Xloader and the secoond stage bootloader. It's probably not good for users overwriting this accidently. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-10-26 18:34 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-10-21 17:55 Beagleboard and barebox problem Victor Rodriguez 2010-10-22 7:05 ` Sascha Hauer 2010-10-25 22:29 ` Victor Rodriguez 2010-10-26 3:39 ` Sascha Hauer 2010-10-26 4:07 ` Victor Rodriguez 2010-10-26 18:34 ` Sascha Hauer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox