Date: Wed, 10 Oct 2012 10:36:17 +0800 From: Ganbold Tsagaankhuu <ganbold@gmail.com> To: Giovanni Trematerra <gianni@freebsd.org> Cc: arm@freebsd.org, Tim Kientzle <tim@kientzle.com>, Oleksandr Tymoshenko <gonzo@freebsd.org> Subject: Re: Towards an ARM system-building script Message-ID: <CAGtf9xN3MG8F2fe7=EPgU7uwKsmAdHwLChA8ZeD4BDG7PT89ug@mail.gmail.com> In-Reply-To: <CACfq092Nakk=DF8_DRttBLwG8sw_3BdhTkfrNoYh7CmgtXQaBA@mail.gmail.com> References: <DD05E72B9F474BFE96B6A4B050D2A18A@gmail.com> <0DCAC001-FF06-431A-A486-2B50BE913B0D@bsdimp.com> <FAA208C1-2872-4BB6-A7EC-04C757533CA4@kientzle.com> <7E18623F-3945-4EA0-B332-5A5C717B20F0@kientzle.com> <9896AA3E-D8A0-4CE8-8160-4672AA07388F@cheney.net> <6B74ADD7-3266-4919-BEB4-B10E0C1BAB58@kientzle.com> <5679C679-A434-4714-BE61-4DC093DA7F34@kientzle.com> <CAGtf9xPgFeDHMnKRacYfUg1BKJx0MjfmX=DWOc-X2NoJfPVB9Q@mail.gmail.com> <8C1192B3-EC56-4D9E-824E-774700FB2EE9@kientzle.com> <CAGtf9xO%2Bz8JhCY-TirNwh-R_zW=hY%2BbPh-4x%2Bz3H0TQHu1aXAQ@mail.gmail.com> <CAGtf9xNr9_Bh1Krw8rB1VkqKMx0eQBOC7SFuGkwS6GD8dHQdLw@mail.gmail.com> <CAGtf9xPzhq8fnarz_fNepfMkRbLc3aGL47DGm4b8K6uV_Do3sg@mail.gmail.com> <CACfq092Nakk=DF8_DRttBLwG8sw_3BdhTkfrNoYh7CmgtXQaBA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 10, 2012 at 5:42 AM, Giovanni Trematerra <gianni@freebsd.org> w= rote: > On Tue, Oct 9, 2012 at 1:02 PM, Ganbold Tsagaankhuu <ganbold@gmail.com> w= rote: >> On Tue, Oct 9, 2012 at 6:48 PM, Ganbold Tsagaankhuu <ganbold@gmail.com> = wrote: >>> On Tue, Oct 9, 2012 at 5:10 PM, Ganbold Tsagaankhuu <ganbold@gmail.com>= wrote: >>>> On Tue, Oct 9, 2012 at 12:42 PM, Tim Kientzle <tim@kientzle.com> wrote= : >>>>> >>>>> On Oct 8, 2012, at 9:07 PM, Ganbold Tsagaankhuu wrote: >>>>> >>>>>> On Mon, Sep 24, 2012 at 2:55 AM, Tim Kientzle <tim@kientzle.com> wro= te: >>>>>>> On Sep 4, 2012, at 9:52 PM, Tim Kientzle wrote: >>>>>>>> On Sep 4, 2012, at 9:33 PM, Dave Cheney wrote: >>>>>>>> >>>>>>>>> Sorry to butt in on this discussion, but how feasible would it be= to adapt this build script to the pandaboard. I understand there may be a = config in svn similar to the beaglebone which may be applicable. >>>>> >>>>>>> I've made significant progress and would >>>>>>> appreciate any feedback: >>>>>>> >>>>>>> github.com/kientzle/freebsd-beaglebone >>>>>>> >>>>>>> * PandaBoard: I have a completely untested >>>>>>> sketch. Someone with a PandaBoard will need >>>>>>> to work through the U-Boot configuration to make >>>>>>> this work. >>>>>> >>>>>> I tried your script on PandaBoard ES. >>>>>> Basically it works with some modifications/considerations: >>>>> >>>>> Wonderful! Thanks for trying it! >>>>> >>>>> Please send me any patches you used; I'll try >>>>> to incorporate them. >>>>> >>>>>> 1. PANDABOARD kernel config should be modified to use mmcsd card as = root. >>>>> >>>>> Would anyone object to adding this line to FreeBSD SVN? >>>>> >>>>> # Boot device is 2nd slice on MMC/SD card >>>>> options ROOTDEVNAME=3D\"ufs:mmcsd0s2\" >>>>> >>>>> >>>>>> 2. u-boot build complains about the board was configured to support = THUMB mode >>>>> >>>>> Hmmm=85 Not sure I understand this. >>>>> >>>>>> 3. Maybe there is need some more patches to have correct u-boot.bin, >>>>>> since it looks for uImage for instance >>>>> >>>>> There will certainly need to be some U-Boot patches. >>>>> >>>>> Perhaps Oleksandr can point us to the source he >>>>> used for that u-boot.bin? If so, I can help fill in >>>>> the options so it can correctly chain ubldr. >>>>> >>>>>> 4. I didn't dig into ubldr/u-boot much, instead modified uEnv.txt to >>>>>> load kernel.bin from first partition which is FAT. I tried 8MB of FA= T. >>>> >>>> >>>> Progress, seems like ubldr is working after patching u-boot. >>>> Here are the patches, uEnv.txt etc: >>>> >>>> http://people.freebsd.org/~ganbold/pandaboard/ >>>> >>>> MLO is used from http://people.freebsd.org/~gonzo/pandaboard/ >>> >>> Strange, with ubldr Ethernet is not found, although kernel config is >>> the same as before. >> >> >> dmesg are at the same place: http://people.freebsd.org/~ganbold/pandaboa= rd/ >> >> > > I booted a kernel with your suggestion but I get a panic during > initialization of ue0 I think You can try without ubldr by putting kernel.bin to FAT partition and loading it from uEnv.txt. At least in my case that way it finds Ethernet. Ganbold > > here the dmesg > is there something stupid I'm doing? > > Script started on Tue Oct 9 23:32:43 2012 > U-Boot SPL 2011.09-rc2 (Oct 06 2011 - 17:56:54) > Texas Instruments OMAP4430 ES2.3 > Bypassing DPLL failed 4a008180 > OMAP SD/MMC: 0 > reading u-boot.img > reading u-boot.img > > > U-Boot 2012.07 (Oct 09 2012 - 22:13:44) > > CPU : OMAP4430 ES2.3 > Board: OMAP4 Panda > I2C: ready > DRAM: 1 GiB > MMC: OMAP SD/MMC: 0 > Using default environment > > In: serial > Out: serial > Err: serial > Net: No ethernet found. > Hit any key to stop autoboot: 0 > reading ubldr > > 740582 bytes read > ## Starting application at 0x88000054 ... > Consoles: U-Boot console > > Compatible API signature found @bfef4258 > > Number of U-Boot devices: 1 > > > > FreeBSD/armv6 U-Boot loader, Revision 1.2 > > (root@armdevbox, Mon Sep 24 16:11:29 CEST 2012) > > DRAM: 1024MB > > > > Device: disk > > | / - \ | / - \ | / - \ | / - > > \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - /boot/kernel/kernel > data=3D0x3947b8+0x1eb24 > \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \= | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | = / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / -= \ | / - syms=3D[0x4+0x73610\ | / - \ | / - \ | / - \ | +0x4+0x5eac1/ - \ |= / - \ | / - \ | ] > > Hit [Enter] to boot immediately, or any other key for command prompt. > > Booting [/boot/kernel/kernel] in 9 seconds... > Booting [/boot/kernel/kernel] in 8 seconds... > Booting [/boot/kernel/kernel] in 7 seconds... > Booting [/boot/kernel/kernel] in 6 seconds... > Booting [/boot/kernel/kernel] in 5 seconds... > Booting [/boot/kernel/kernel] in 4 seconds... > Booting [/boot/kernel/kernel] in 3 seconds... > Booting [/boot/kernel/kernel] in 2 seconds... > Booting [/boot/kernel/kernel] in 1 second... > Booting [/boot/kernel/kernel]... > > > / - \ | / - \ fdt_start: 0x0056EA48 > > fdt_reg_valid(): reg#0 (start: 0x80000000 size: 0x40000000) valid! > > Kernel entry at 0x80200100... > > initarm: console initialized > arg1 kmdp =3D 0xc05b0000 > boothowto =3D 0x00000000 > dtbp =3D 0xc056ea48 > kernel image addresses: > kernbase =3D 0xc0000000 > _etext (sdata) =3D 0xc04e2be8 > _edata =3D 0xc05947b8 > __bss_start =3D 0xc05947b8 > _end =3D 0xc05b32dc > loader passed (static) kenv: > no env, null ptr > processing avail regions: > 80000000-c0000000 -> 80000000-80200000 =3D 200000 > 80667000-c0000000 -> 80667000-c0000000 =3D 3f999000 > fill in phys_avail: > region: 0x80000000 - 0x80200000 (0x00200000) > region: 0x80667000 - 0xc0000000 (0x3f999000) > KDB: debugger backends: ddb > KDB: current backend: ddb > Copyright (c) 1992-2012 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 10.0-CURRENT #0 r+1bfcafd: Mon Sep 24 16:33:31 CEST 2012 > root@armdevbox:/usr/obj/arm.armv6/usr/home/gianni/work/freebsd/sys/PA= NDABOARD > arm > CPU: Cortex A9-r1 rev 3 (Cortex-A core) > Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext > WB disabled EABT branch prediction enabled > LoUU:2 LoC:1 LoUIS:2 > Cache level 1: > 32KB/32B 4-way data cache WB Read-Alloc Write-Alloc > 32KB/32B 4-way instruction cache Read-Alloc > real memory =3D 1073741824 (1024 MB) > avail memory =3D 1046220800 (997 MB) > Texas Instruments OMAP4430 Processor, Revision ES2.3 > random device not loaded; using insecure entropy > simplebus0: <Flattened device tree simple bus> on fdtbus0 > gic0: <ARM Generic Interrupt Controller> mem > 0xe8241000-0xe8241fff,0xe8240100-0xe82401ff on simplebus0 > gic0: pn 0x390, arch 0x1, rev 0x0, implementer 0x43b nirqs 160 > l2cache0: <PL310 L2 cache controller> mem 0xe8242000-0xe8242fff on simple= bus0 > L2 Cache: 1024KB/32B 16 ways > mp_tmr0: <ARM Generic MPCore Timers> mem > 0xe8240200-0xe82402ff,0xe8240600-0xe82406ff irq 27,29 on simplebus0 > Timecounter "ARM MPCore Timecouter" frequency 504000000 Hz quality 1000 > Event timer "ARM MPCore Eventtimer" frequency 504000000 Hz quality 1000 > uart0: <16750 or compatible> mem 0xe8020000-0xe8020fff irq 106 on simpleb= us0 > uart0: console (115384,n,8,1) > ti_scm0: <TI Control Module> mem 0xd4e96000-0xd4e96fff on simplebus0 > setting internal 4 for usbb1_ulpiphy_stp > setting internal 10c for usbb1_ulpiphy_clk > setting internal 10c for usbb1_ulpiphy_dir > setting internal 10c for usbb1_ulpiphy_nxt > setting internal 10c for usbb1_ulpiphy_dat0 > setting internal 10c for usbb1_ulpiphy_dat1 > setting internal 10c for usbb1_ulpiphy_dat2 > setting internal 10c for usbb1_ulpiphy_dat3 > setting internal 10c for usbb1_ulpiphy_dat4 > setting internal 10c for usbb1_ulpiphy_dat5 > setting internal 10c for usbb1_ulpiphy_dat6 > setting internal 10c for usbb1_ulpiphy_dat7 > omap4_prcm0: <TI OMAP Power, Reset and Clock Management> mem > 0xd4e97000-0xd4e98fff,0xd4e99000-0xd4e99fff,0xd4e9a000-0xd4ea1fff on > simplebus0 > gpio0: <TI General Purpose I/O (GPIO)> mem > 0xd4ea2000-0xd4ea2fff,0xe8055000-0xe8055fff,0xe8057000-0xe8057fff,0xe8059= 000-0xe8059fff,0xe805b000-0xe805bfff,0xe805d000-0xe805dfff > irq 61,62,63,64,65,66 on simplebus0 > gpioc0: <GPIO controller> on gpio0 > gpiobus0: <GPIO bus> on gpio0 > ehci0: <TI OMAP USB 2.0 controller> mem > 0xd4ea3c00-0xd4ea3cff,0xd4ea4000-0xd4ea46ff,0xd4ea5000-0xd4ea5fff irq > 109 on simplebus0 > ehci0: Starting TI EHCI USB Controller > ehci0: UHH revision 0x50700100 > ehci0: OMAP_UHH_SYSCONFIG: 0x00000014 > ehci0: UHH setup done, uhh_hostconfig=3D0x8000001c > ehci0: PHY reset operation timed out > usbus0: EHCI version 1.0 > usbus0 on ehci0 > iichb0: <TI I2C Controller> mem 0xe8070000-0xe80700ff irq 88 on simplebus= 0 > iichb0: I2C revision 4.0 > iicbus0: <OFW I2C bus> on iichb0 > iic0: <I2C generic I/O> on iicbus0 > ti_sdma0: <TI sDMA Controller> mem 0xd4ea6000-0xd4ea6fff irq > 44,45,46,47 on simplebus0 > ti_sdma0: sDMA revision 00010900 > ti_mmchs0: <TI MMC/SD/SDIO High Speed Interface> mem > 0xe809c000-0xe809cfff irq 115 on simplebus0 > mmc0: <MMC/SD bus> on ti_mmchs0 > Timecounters tick every 10.000 msec > usbus0: 480Mbps High Speed USB v2.0 > ugen0.1: <Texas Instruments> at usbus0 > uhub0: <Texas Instruments EHCI root HUB, class 9/0, rev 2.00/1.00, > addr 1> on usbus0 > mmcsd0: 3740MB <SDHC SA04G 0.7 SN 439227549 MFG 06/2012 by 2 TM> at > mmc0 25.0MHz/4bit/1-block > bootpc_init: wired to interface 'ue0' > uhub0: 3 ports with 3 removable, self powered > panic: bootpc_init: Could not find interface specified by BOOTP_WIRED_TO:= ue0 > KDB: enter: panic > [ thread pid 0 tid 100000 ] > Stopped at kdb_enter+0x48: ldrb r15, [r15, r15, ror r15]! > db> bt > Tracing pid 0 tid 100000 td 0xc0599ff0 > db_trace_self() at db_trace_self+0xc > scp=3D0xc04bc5a8 rlv=3D0xc04bc5f4 (db_trace_thread+0x38) > rsp=3D0xc05c4ad4 rfp=3D0xc05c4ae0 > db_trace_thread() at db_trace_thread+0xc > scp=3D0xc04bc5c8 rlv=3D0xc022b21c (db_command_init+0x354) > rsp=3D0xc05c4ae4 rfp=3D0xc05c4b00 > db_command_init() at db_command_init+0x27c > scp=3D0xc022b144 rlv=3D0xc022ac20 (db_skip_to_eol+0x4a0) > rsp=3D0xc05c4b04 rfp=3D0xc05c4ba8 > r5=3D0x00000000 r4=3D0xc056e354 > db_skip_to_eol() at db_skip_to_eol+0x1d4 > scp=3D0xc022a954 rlv=3D0xc022ad8c (db_command_loop+0x60) > rsp=3D0xc05c4bac rfp=3D0xc05c4bb8 > r10=3D0x600001d3 r8=3D0x00000001 > r7=3D0x00000000 r6=3D0x00000000 r5=3D0xc056e61c r4=3D0xc05c4bc4 > db_command_loop() at db_command_loop+0xc > scp=3D0xc022ad38 rlv=3D0xc022d24c (X_db_sym_numargs+0xf4) > rsp=3D0xc05c4bbc rfp=3D0xc05c4cd8 > X_db_sym_numargs() at X_db_sym_numargs+0x14 > --More-- > scp=3D0xc022d16c rlv=3D0xc03467a0 (kdb_trap+0xa4) > rsp=3D0xc05c4cdc rfp=3D0xc05c4d00 > r4=3D0xc05c4d88 > kdb_trap() at kdb_trap+0xc > scp=3D0xc0346708 rlv=3D0xc04cccf0 (undefinedinstruction+0x2f0) > rsp=3D0xc05c4d04 rfp=3D0xc05c4d84 > r10=3D0xe7ffffff r8=3D0xe7ffffff > r7=3D0xc05c4d88 r6=3D0x00000000 r5=3D0x00000000 r4=3D0x00000000 > undefinedinstruction() at undefinedinstruction+0xc > scp=3D0xc04cca0c rlv=3D0xc04bddac (address_exception_entry+0x50) > rsp=3D0xc05c4d88 rfp=3D0xc05c4de4 > r10=3D0xc497a000 r9=3D0x0000000a > r8=3D0x00000000 r7=3D0xc0599ff0 r6=3D0xc051ede4 r5=3D0xc059c000 > r4=3D0xc050ee60 > kdb_enter() at kdb_enter+0xc > scp=3D0xc0346284 rlv=3D0xc0311a24 (panic+0xe8) > rsp=3D0xc05c4de8 rfp=3D0xc05c4dfc > r4=3D0x00000100 > panic() at panic+0x10 > scp=3D0xc031194c rlv=3D0xc04148d0 (bootpc_init+0x288) > --More-- > rsp=3D0xc05c4e10 rfp=3D0xc05c4ee0 > bootpc_init() at bootpc_init+0xc > scp=3D0xc0414654 rlv=3D0xc02bb024 (mi_startup+0xf8) > rsp=3D0xc05c4ee4 rfp=3D0xc05c4ef4 > r10=3D0x88052e48 r9=3D0xc0687000 > r8=3D0x0000000a r7=3D0x8020014c r6=3D0xbfef3ccc r5=3D0x80200158 > r4=3D0xc052eef8 > mi_startup() at mi_startup+0xc > scp=3D0xc02baf38 rlv=3D0xc0200218 (btext+0x118) > rsp=3D0xc05c4ef8 rfp=3D0x00000000 > r4=3D0x80200258 > db> ~. > > > Disconnected. > > Script done on Tue Oct 9 23:35:26 2012
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGtf9xN3MG8F2fe7=EPgU7uwKsmAdHwLChA8ZeD4BDG7PT89ug>