[Buildroot] trying to use https://github.com/beagleboard/linux.git with buildroot

Craig Swank craigswank at fastmail.fm
Sat Dec 26 18:34:13 UTC 2015


My build succeeded, but I'm having trouble with booting now.  When I
boot with the uEnv.txt you pasted:

bootfile=zImage
fdtfile=am335x-boneblack.dtb
loadaddr=0x80007fc0
fdtaddr=0x80F80000
loadfdt=fatload mmc 0:1 ${fdtaddr} ${fdtfile}
loaduimage=fatload mmc 0:1 ${loadaddr} ${bootfile}
console=ttyO0,115200n8
mmcroot=/dev/mmcblk0p2
mmcrootfstype=ext2
uenvcmd=mmc rescan; run loaduimage; run loadfdt; run fdtboot
fdtboot=run mmc_args; run mmcargs; bootz ${loadaddr} - ${fdtaddr}
mmc_args=setenv bootargs console=${console} ${optargs} root=${mmcroot}
rw
rootfstype=${mmcrootfstype} root wait

I got an error about mmcargs not being defined.  The fdtboot line has
both "run mmc_args" and "run mmcargs".  I tried removing the 'run
mmcargs' part so now the uEnv.txt looks like:

bootfile=zImage
fdtfile=am335x-boneblack.dtb
loadaddr=0x80007fc0
fdtaddr=0x80F80000
loadfdt=fatload mmc 0:1 ${fdtaddr} ${fdtfile}
loaduimage=fatload mmc 0:1 ${loadaddr} ${bootfile}
console=ttyO0,115200n8
mmcroot=/dev/mmcblk0p2
mmcrootfstype=ext2
uenvcmd=mmc rescan; run loaduimage; run loadfdt; run fdtboot
fdtboot=run mmc_args; bootz ${loadaddr} - ${fdtaddr}
mmc_args=setenv bootargs console=${console} ${optargs} root=${mmcroot}
rw
rootfstype=${mmcrootfstype} root wait


Next, when I boot with the new uEnv.txt file the error I get is:

U-Boot 2015.10 (Dec 26 2015 - 10:23:47 -0700)

       Watchdog enabled
I2C:   ready
DRAM:  512 MiB
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Error - No Valid Environment Area found
*** Warning - bad CRC, using default environment

Net:   <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
reading boot.scr
** Unable to read file boot.scr **
reading uEnv.txt
471 bytes read in 3 ms (153.3 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
reading zImage
7462256 bytes read in 404 ms (17.6 MiB/s)
reading am335x-boneblack.dtb
59295 bytes read in 10 ms (5.7 MiB/s)
Kernel image @ 0x80007fc0 [ 0x000000 - 0x71dd70 ]
data abort
pc : [<9ff62ef8>]          lr : [<9ff62f55>]
reloc pc : [<80810ef8>]    lr : [<80810f55>]
sp : 9ef31778  ip : 80725d30     fp : 9ef34f74
r10: 00000002  r9 : 9ef31ed8     r8 : 9ffa35ac
r7 : 9ffa35b0  r6 : 00000003     r5 : 9ef34f74  r4 : 9ffa3514
r3 : 00000000  r2 : 9ffa3514     r1 : 9ef34f74  r0 : 00000000
Flags: nZcv  IRQs off  FIQs on  Mode SVC_32
Resetting CPU ...

resetting ...

I really need to learn more about u-boot, but google searches suggest
that it means the loadaddr or fdtaddr is incorrect but I'm unable to
find a solution.  Any suggestions?

I appreciate you working with me, Chris.  I'm obsessed with getting this
to work and I feel I'm getting close.




On Sat, Dec 26, 2015, at 08:00 AM, Chris LaRocque wrote:
> Craig Swank wrote:
> 
> > Here is another thing I've found:
> > 
> > https://github.com/beagleboard/linux/issues/49
> > 
> > In that issue the person had some addresses set incorrectly in uEnv.txt,
> > but mine doesn't have any addresses set:
> > 
> > bootpart=0:1
> > bootdir=
> > uenvcmd=run loadimage;run loadramdisk;run findfdt;run loadfdt;run ram
> > boot
> > 
> > Is there something that needs to be set in uEnv.txt?
> > 
> > 
> > On Wed, Dec 23, 2015, at 02:52 PM, Thomas Petazzoni wrote:
> >> Dear Craig Swank,
> >> 
> >> On Wed, 23 Dec 2015 14:45:36 -0800, Craig Swank wrote:
> >> > Is it strange to you that when I do the build the output/build
> >> > directory has both of these dirs?
> >> > 
> >> > ➜  buildroot git:(master) ✗ ls output/build/linux-*
> >> > output/build/linux-4.1.4-ti-r9
> >> > output/build/linux-headers-3.12.10
> >> 
> >> No, it is perfectly fine. linux-headers is used when building the
> >> toolchain. linux is used to build the kernel itself.
> >> 
> >> Thomas
> >> --
> >> Thomas Petazzoni, CTO, Free Electrons
> >> Embedded Linux, Kernel and Android engineering
> >> http://free-electrons.com
> > 
> > 
> Hello Craig
> 
> Hopefully the attachments will be accepted.
> 
> The kernel defconfig from beagleboard.org:
> 
> 1> doesn't set DEPRECATED_PARAM_STRUCT [=y] in the kernel .config.
> uEnv.txt 
> (uboot) passes in the console config as "console=ttyO0,115200n8"
> 
> 2> doesn't set EXT2_FS [=y] and the default buildroot .config FS image is 
> ext2. at least for the beaglebone black and I'm trying to keep things
> sane.
> 
> You'll want to do a make source and them make linux-menuconfig and change 
> the parameters above.
> 
> I haven't created a patch file because I'm lazy.
> 
> Also attached is my patch (hack) for dtc, derived from Robert Nelsons 
> bb.org-overlays.
> 
> The dtc patch file goes into BR2_GLOBAL_PATCH_DIR , 
> BR2_GLOBAL_PATCH_DIR"/dtc"
> 
> Look in the buildroot .config for how I set BR2_GLOBAL_PATCH_DIR. you'll 
> need to point that to your own global patch directory.
> 
> Regards
> 
> Chris
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> Email had 2 attachments:
> + host-dtc-1.4.1.patch
>   33k (text/x-patch)
> + cleaned_buildroot_v41_12182015_01.config
>   61k (text/plain)


-- 
  Craig Swank
  craigswank at fastmail.fm



More information about the buildroot mailing list