[Letux-kernel] BeagleBoard XM OpenMoko Hyprid (bb+b1) is booting with 2016-11 U-Boot :)

H. Nikolaus Schaller hns at goldelico.com
Wed Dec 14 19:40:24 CET 2016


Yeah!

The trick was to add CONFIG_OMAP3_GPIO_2.

I think the bb+b1 assumes a different gpio in a different gpio module and therefore succeeds.

Anyways, we have it booting on GTA04! It should now also work on Letux 3704 (haven't tested).

There are still some things to be polished:
* reports "Error: Bad compare! failed"
* reading environment from NAND fails
* therefore the boot.scr always flashes a new (old) x-loader
* there is some invalid mmc command in the boot.scr
* GTA04A5 might need some patches for OneNAND handling
* boot.scr needs to be updated

But latest code is here:

http://git.goldelico.com/?p=gta04-uboot.git;a=shortlog;h=refs/heads/letux-2016.11

Comments and help are welcome!

BR,
Nikolaus




U-Boot SPL 2016.11-00154-g0dbf695-dirty (Dec 14 2016 - 19:01:17)
Trying to boot from MMC1
Found GTA04A3
pop_mfr = 2c pop_id = bc
reading u-boot.img
reading u-boot.img


U-Boot 2016.11-00154-g0dbf695-dirty (Dec 14 2016 - 19:01:17 +0100)

OMAP3630/3730-GP ES1.2, CPU-OPP2, L3-200MHz, Max CPU Clock 1 Ghz
GTA04 + LPDDR/NAND
I2C:   ready
DRAM:  512 MiB
NAND:  512 MiB
MMC:   OMAP SD/MMC: 0
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
NAND read from offset 260000 failed -74
*** Warning - readenv() failed, using default environment

OMAP die ID: 166600029ff800000163810c17036010
Found GTA04A3
Device Tree: omap3-gta04a3.dtb
Net:   board_eth_init
usb_ether
Error: usb_ether address not set.

Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
gpio: pin 173 (gpio 173) value is 0
gpio: pin 4 (gpio 4) value is 1
SD/MMC found on device 0
reading user.txt
** Unable to read file user.txt **
reading boot.scr
14649 bytes read in 5 ms (2.8 MiB/s)
Running bootscript from mmc0 ...
## Executing script at 80200000
*** if you boot from NAND don-t worry about error messages when U-Boot tries to read a non-existing MMC ***
Setting bus to 0
isXM
did init LED driver for TCA6507
*** initializing GTA04 environment ***

NAND read: device 0 offset 0x280000, size 0x4
 4 bytes read: OK
*** initializing LCM ***
board_video_init() for JBT6K74-AS / TD028TTEC1
1
2
3 for 57
4 9ff65dc5
5
did backlight_init() on GPIO_57
isXM
did panel_reg_init()
dss panel config
dss enable
did board_video_init()
did jbt_init_regs()
lcm backlight level set to 255 (0..255)
background color: ff0000
*** initializing TSC for boot menu ***
did tsc2007_init()
*** NAND flash ***
Setting bus to 0
reading x-load.flash
19804 bytes read in 6 ms (3.1 MiB/s)
*** flashing Xloader ***

NAND erase: device 0 offset 0x0, size 0x80000
Erasing at 0x60000 -- 100% complete.
OK

NAND write: device 0 offset 0x0, size 0x20000
 131072 bytes written: OK

NAND write: device 0 offset 0x20000, size 0x20000
 131072 bytes written: OK

NAND write: device 0 offset 0x40000, size 0x20000
 131072 bytes written: OK

NAND write: device 0 offset 0x60000, size 0x20000
 131072 bytes written: OK
*** Xloader flashed ***
reading u-boot.flash
296696 bytes read in 27 ms (10.5 MiB/s)
*** flashing U-Boot ***

NAND erase: device 0 offset 0x80000, size 0x1e0000
Erasing at 0x240000 -- 100% complete.
OK

NAND write: device 0 offset 0x80000, size 0x150000
 1376256 bytes written: OK
*** write our new environment ***
Saving Environment to NAND...
Erasing NAND...
Erasing at 0x260000 -- 100% complete.
Writing to NAND... OK
reading splash.rgb16z
39304 bytes read in 8 ms (4.7 MiB/s)
*** flashing splash ***

NAND write: device 0 offset 0x1d0000, size 0x40000
 262144 bytes written: OK
reading menu.rgb16z
247281 bytes read in 23 ms (10.3 MiB/s)
*** flashing menu ***

NAND write: device 0 offset 0x210000, size 0x40000
 262144 bytes written: OK
reading boot.scr
14649 bytes read in 6 ms (2.3 MiB/s)
*** flashing boot.scr ***

NAND write: device 0 offset 0x250000, size 0x10000
 65536 bytes written: OK
*** U-Boot flashed ***

*********************************
*** Flashing Done ***
*** Device will reboot ***
*********************************

Setting bus to 0
mmc - MMC sub system

Usage:
mmc info - display info of the current MMC device
mmc read addr blk# cnt
mmc write addr blk# cnt
mmc erase blk# cnt
mmc rescan
mmc part - lists available partition on current mmc device
mmc dev [dev] [part] - show or set current mmc device [partition]
mmc list - lists available devices
mmc hwpartition [args...] - does hardware partitioning
  arguments (sizes in 512-byte blocks):
    [user [enh start cnt] [wrrel {on|off}]] - sets user data area attributes
    [gp1|gp2|gp3|gp4 cnt [enh] [wrrel {on|off}]] - general purpose partition
    [check|set|complete] - mode, complete set partitioning completed
  WARNING: Partitioning is a write-once setting once it is set to complete.
  Power cycling is required to initialize partitions after set to complete.
mmc setdsr <value> - set DSR register value

trying partitions 1 2 3 4
reading uImage
4610344 bytes read in 355 ms (12.4 MiB/s)
found kernel /uImage on partition 1
reading bootargs.scr
2108 bytes read in 4 ms (514.6 KiB/s)
## Executing script at 80800000
running bootargs.scr
bootargs.scr done...
reading omap3-gta04a3.dtb
74823 bytes read in 11 ms (6.5 MiB/s)
## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Linux-4.9.0-letux+
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4610280 Bytes = 4.4 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 81c00000
   Booting using the fdt blob at 0x81c00000
   Loading Kernel Image ... OK
   Using Device Tree in place at 81c00000, end 81c15446

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.0-letux+ (hns at iMac.local) (gcc version 4.9.2 (GCC) ) #518 SMP PREEMPT Mon Dec 12 21:06:05 CET 2016
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: Goldelico GTA04A3/Letux 2804
[    0.000000] debug: ignoring loglevel setting.
[    0.000000] cma: Reserved 16 MiB at 0x9e800000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 130560
[    0.000000] free_area_init_node: node 0, pgdat c0c9de00, node_mem_map df9f1000
[    0.000000]   Normal zone: 1024 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 130560 pages, LIFO batch:31
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] OMAP3630 ES1.2 (l2cache iva sgx neon isp 192mhz_clk)
[    0.000000] percpu: Embedded 15 pages/cpu @df996000 s31680 r8192 d21568 u61440
[    0.000000] pcpu-alloc: s31680 r8192 d21568 u61440 alloc=15*4096
[    0.000000] pcpu-alloc: [0] 0 
...


> Am 14.12.2016 um 18:28 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> 
> 
>> Am 13.12.2016 um 20:29 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>> 
>> 
>>> Am 12.12.2016 um 22:05 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>>> 
>>> 
>>> I had to fix the Makefile for the bb+b1 variant.
>>> Although it reports some errors, the boot.scr shows the boot menu
>>> and if I choose to boot from partition 1, I get the 4.9.0 kernel
>>> up and running :)
>> 
>> I have found some issues (mainly with RAM initialization) for the GTA04
>> board code and now SPL works while U-Boot starts and is then stuck:
>> 
>> U-Boot SPL 2016.11-00141-gcc48556-dirty (Dec 13 2016 - 20:07:42)
>> Trying to boot from MMC1
>> board_mmc_power_init
>> Found GTA04A3
>> pop_mfr = 2c pop_id = bc
>> reading u-boot.img
>> reading u-boot.img
>> 
>> 
>> U-Boot 2016.11-00141-gcc48556-dirty (Dec 13 2016 - 20:07:42 +0100)
>> 
>> OMAP3630/3730-GP ES1.2, CPU-OPP2, L3-200MHz, Max CPU Clock 1 Ghz
>> GTA04 + LPDDR/NAND
>> I2C:   ready
>> DRAM:  1 GiB
>> show_boot_progress
>> NAND:  512 MiB
>> MMC:   board_mmc_init !SPL
>> OMAP SD/MMC: 0
>> Error: Bad compare! failed
>> Error: Bad compare! failed
>> Error: Bad compare! failed
>> NAND read from offset 260000 failed -74
>> *** Warning - readenv() failed, using default environment
>> 
>> misc_init_r
>> Found GTA04A3
>> Device Tree: omap3-gta04a3
>> OMAP die ID: 166600029ff800000163810c17036010
>> 
> 
> I have traced down this freeze to be a problem with the led command.
> After removing direct LED control it continues and even starts the
> boot.scr :)
> 
> Or I can break into the command line.
> 
> But then again it hangs while trying to initialize the LCM (or to be
> more specific: the gpio 57 for backlight control).
> 
> It turns out that the common problem has something to do with the 
> gpio driver. It hangs in omap_gpio_direction_output() when writing
> 0x02000000 to address 0x49050090. mw 0x49050090 0x02000000 freezes
> as well.
> 
> This most likely means that the GPIO2 module is not initialized
> or clocked properly.
> 
> Well, this seems to be another subtle difference to the bb+b1
> variant (which partially runs on the GTA04 and even loads the
> kernel - but is missing the device tree).
> 
> So please keep fingers crossed and encourage me to trace down and
> fix this n+1st bug...
> 
> BR,
> Nikolaus
> 



More information about the Letux-kernel mailing list