Hi Cnut,

> Am 11.03.2018 um 18:34 schrieb cnut <c...@posteo.de>:
> 
> Hello Nikolaus,
> Hello Andreas,
> 
> 
> the good news: with the tutorial of Nikolaus, dmesg shows that the device is 
> alive...
> [ 2895.846968] usb 1-4: new high-speed USB device number 4 using xhci_hcd
> [ 2895.987845] usb 1-4: unable to get BOS descriptor
> [ 2895.988919] usb 1-4: New USB device found, idVendor=0451, idProduct=d00e
> [ 2895.988932] usb 1-4: New USB device strings: Mfr=33, Product=37, 
> SerialNumber=0
> [ 2895.988941] usb 1-4: Product: OMAP3630
> [ 2895.988949] usb 1-4: Manufacturer: Texas Instruments
> [ 2898.990793] usb 1-4: USB disconnect, device number 4

Fine!

> 
> @Nikolaus:
> > Do you by any chance know when you did last time flash the boot loader?
> S/N is 6131-0019.

Ok, according to our database it was factory tested 2012-10-31 14:17:01

so I assume that this version was originally installed:

        http://download.goldelico.com/gta04-u-boot/20121030-GTA04-Production/

> I started this thread, because I tried to flash the bootloader (begin of 
> march 2018). Before, I never flashed the bootloader.

Usually upgrades should not be needed, but the device tree kernel mechanism 
required us
to make an exception. The reason is that the kernel is now "univeral" and the 
boot-loader
must know which device it is booting and load the correct DT file into RAM 
before
starting the kernel.

This was not available in older boot-loaders where it was even possible to 
runtime-detect
different "board files" and variants by the kernel.

> Maybe it helps that QtMokov55 and QtMokov56 were running with the original 
> bootloader.
> Maybe you know the bootloader version, because you assembled the device: The 
> device was bought by 2013/01 as a complete device from pulster. Because there 
> were issues with the hardware [1], it was sent to you for repairing. If you 
> need more information, we should use private mail.
> 
> 
> 
> > Maybe the u-boot environment of an old boot loader in NAND flash breaks
> > booting a new one and must be reset (which does not work if the device
> > does not boot).
> OK, seems to be the case here.
> Bootloaders before 2013/02 are only available at [2]. But there are no e. g. 
> MLO files etc. in the directories. There are u-boot.bin, u-bootflash etc. and 
> makesd.

Some of the archived versions seem to be incomplete. At that early ages the 
packages were edited manually.

> Do I have to flash using those makesd versions, which are in same directory 
> than the u-boot files?

> 
> Did the makesd syntax for creating a sd card change over the time?

Well, the makesd from that times was very simple compared to the current one, 
but it should
suffice for making an µSD card.

But it might depend on syntax and specialities of older versions of sfdisk and 
other command line
tools. So if you have a recent Ubuntu or Debian, sfdisk will likely fail.

Hence let's experiment with latest makesd and make it install the old boot 
files.

With new makesd I tried:

./makesd gta04 -f1 -b 
http://download.goldelico.com/gta04-u-boot/20121030-GTA04-Production/u-boot.bin 
-k http://download.goldelico.com/gta04-u-boot/20121030-GTA04-Production/uImage 
-d none -f2 -m 
http://download.goldelico.com/gta04-u-boot/20121030-GTA04-Production/modules.tgz

This takes the old MLO, u-boot, boot.scr and the old kernel (seems to be a 
2.6.32) and no device-tree files to the first partition and the modules to the 
second one and creates these partitions:

1: fat 5% 
b:/+http://download.goldelico.com/gta04-u-boot/20121030-GTA04-Production/* 
k:/+http://download.goldelico.com/gta04-u-boot/20121030-GTA04-Production/uImage 
dt:/+none r:none m:none c:none
2: ext4 95% b:/+none k:/+none dt:/+none 
r:http://download.goldelico.com/letux-debian-rootfs/latest-armhf-lxde.tbz 
m:http://download.goldelico.com/gta04-u-boot/20121030-GTA04-Production/modules.tgz
 c:http://download.goldelico.com/letux-debian-rootfs/latest-config.tgz
3: none 0% b:/+none k:/+none dt:/+none r:none m:none c:none
4: none 0% b:/+none k:/+none dt:/+none r:none m:none c:none

It did boot the very old MLO, the old u-boot, did flash the NAND and did start 
the 2.6.32 kernel (showing a small Tux on the display).
I could also login as root but there was no X11 working (well the X11 config of 
Debian Jessie + LXDE is not compatible to 2.6.32 kernels).

Here is the beginning of the RS232 console log from booting and flashing:

tذb$U   @D  @

Texas Instruments X-Loader 1.4.4ss modified for GTA04 (Oct 30 2012 - 09:50:54)
OMAP3630/3730-GP ES2.1
Board detected: GTA04A3
Memory: Micron MCP 256MB/bank
Reading boot sector
Loading u-boot.bin (270020 bytes) from mmc/sd


U-Boot 2011.03-rc1 (Oct 30 2012 - 09:58:13)

OMAP3630/3730-GP ES2.1, CPU-OPP2, L3-165MHz, Max CPU Clock 800 Mhz
GTA04 + LPDDR/NAND
I2C:   ready
DRAM:  512 MiB
NAND:  512 MiB
MMC:   OMAP SD/MMC: 0
Using default environment

In:    serial
Out:   serial
Err:   serial
Die ID #003400029ff800000163810c1800f00c
Hit any key to stop autoboot:  0 
reading boot.scr

13336 bytes read
Running bootscript from mmc ...
## Executing script at 82000000
*** 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
did init LED driver for TCA6507
*** initializing GTA04 environment ***
*** initializing LCM ***
board_video_init() for JBT6K74-AS / TD028TTEC1
did backlight_init() on GPIO_57
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

17936 bytes read
*** flashing Xloader ***
HW ECC selected

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

270356 bytes read
*** flashing U-Boot ***
SW ECC selected

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... done
reading splash.rgb16z

39353 bytes read
*** flashing splash ***
SW ECC selected

NAND write: device 0 offset 0x1d0000, size 0x40000
 262144 bytes written: OK
reading menu.rgb16z

248221 bytes read
*** flashing menu ***
SW ECC selected

NAND write: device 0 offset 0x210000, size 0x40000
 262144 bytes written: OK
reading boot.scr

13336 bytes read
*** flashing boot.scr ***
SW ECC selected

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

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

Setting bus to 0
trying partitions 1 2 3 4
reading uImage

3216320 bytes read
found kernel on FAT partition 1
reading bootargs.scr

2251 bytes read
## Executing script at 80800000
running bootargs.scr
bootargs.scr done...
## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Linux-2.6.32
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3216256 Bytes = 3.1 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing 
Linux.....................................................................................................................................................................................................................
 done, booting the kernel.
[    0.000000] Linux version 2.6.32 (hns@iMac.local) (gcc version 4.4.5 (GCC) ) 
#211 PREEMPT Sat Oct 27 09:56:41 CEST 2012
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction 
cache
[    0.000000] Machine: GTA04 (3019)
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] OMAP3630/DM3730 ES1.0 (l2cache iva sgx neon isp 192mhz_clk )
[    0.000000] SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x100000
[    0.000000] Reserving 12582912 bytes SDRAM for VRAM
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 130048
[    0.000000] Kernel command line: console=ttyO2,115200n8 mpurate=800 vram=12M 
omapfb.vram=0:8M,1:4M omapfb.mode=dvi:1024x768MR-16@60 omapfb.debug=y 
omapdss.def_disp=lcd root=/dev/mmcblk0p2 rw rootfstype=ext4,ext3 rootwait
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 256MB 256MB = 512MB total
[    0.000000] Memory: 500224KB available (6180K code, 666K data, 204K init, 0K 
highmem)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:402
[    0.000000] Clocking rate (Crystal/Core/MPU): 26.0/332/600 MHz
[    0.000000] clk_set_rate 120000000l
[    0.000000] clock: set_rate for clock dpll5_ck to rate 120000000
[    0.000000] clk_set_rate 120000000l
[    0.000000] clock: set_rate for clock dpll5_m2_ck to rate 120000000
[    0.000000] Reprogramming SDRC clock to 332000000 Hz
... snip ...

Trying to boot from a single partition µSD card with a 4.15.6 kernel (./makesd 
lxde) doesn't work
because the DTB is missing. Boot log hangs with "Starting kernel ...".

Next, I made another µSD card with latest available (18 Dec 2017) boot loader 
(./makesd gta04) to try to
reproduce your upgrade problem.

Unexpectedly it did work as well. The GTA04 did flash again and booted well 
into LXDE.
The only strange things I noticed are some warnings about readenv() failed and 
a wrong load command.
Especially it wasn't able to load and source the /boot.scr (which should be 
doing the flashing!)
and reads boot.scr a second time which then succeeds (although the file exists 
only once!).

U-Boot SPL 2016.11-00249-gc9d20fc (Dec 18 2017 - 17:25:50)
Trying to boot from MMC1
pop_mfr = 2c pop_id = bc
reading u-boot.img
spl: payload image: U-Boot 2016.11-00249-gc9d20fc fo load addr: 0x800fffc0 
size: 411048
reading u-boot.img
loaded - jumping to U-Boot...
U-Boot 2016.11-00249-gc9d20fc (Dec 18 2017 - 17:25:50 +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
... snip ...
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
NAND read from offset 240000 failed -74
*** Warning - readenv() failed, using default environment

OMAP die ID: 003400029ff800000163810c1800f00c
Found GTA04A3
Device Tree: omap3-gta04a3.dtb
Net:   usb_ether
Error: usb_ether address not set.

Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
load - load binary file from a filesystem

Usage:
load <interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]]
    - Load binary file 'filename' from partition 'part' on device
       type 'interface' instance 'dev' to address 'addr' in memory.
      'bytes' gives the size to load in bytes.
      If 'bytes' is 0 or omitted, the file is read until the end.
      'pos' gives the file byte position to start reading from.
      If 'pos' is 0 or omitted, the file is read from the start.
## Executing script at 82000000
Wrong image format for "source" command
SCRIPT FAILED: continuing...
reading /omap3-gta04a3.dtb
70988 bytes read in 11 ms (6.2 MiB/s)
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
14662 bytes read in 5 ms (2.8 MiB/s)
Running bootscript from mmc0 ...
## Executing script at 80200000
Main battery charge:    3986 mV
Battery temperature:    39 C
Backup battery voltage: 3607 mV
AC charger voltage:     7 mV
USB charger voltage:    3992 mV
Charging current:       7 mA
Charger present :       0
*** 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
did init LED driver for TCA6507
## Resetting to default environment
*** initializing GTA04 environment ***

NAND read: device 0 offset 0x280000, size 0x4
 4 bytes read: OK
*** initializing LCM ***
board_video_init() for JBT6K74-AS / TD028TTEC1
did backlight_init() on GPIO_57
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()
*** flashing NAND (nand) ***
Setting bus to 0
reading MLO.flash
55524 bytes read in 8 ms (6.6 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 0x80000
 524288 bytes written: OK
*** Xloader flashed ***
reading u-boot.img.flash
411048 bytes read in 36 ms (10.9 MiB/s)
*** flashing U-Boot ***
reading boot.scr
14662 bytes read in 5 ms (2.8 MiB/s)
*** adding boot.scr ***
reading splash.rgb16z
39304 bytes read in 7 ms (5.4 MiB/s)
*** adding splash image ***
reading menu.rgb16z
247281 bytes read in 23 ms (10.3 MiB/s)
*** adding menu image ***

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

NAND write: device 0 offset 0x80000, size 0x1c0000
 1835008 bytes written: OK
*** write our new environment ***
Saving Environment to NAND...
Erasing NAND...
Erasing at 0x260000 -- 100% complete.
Writing to NAND... OK
*** U-Boot flashed ***
please flash kernel and rootfs from Linux

*********************************
*** Flashing Done ***
... snip ...

Rebooting didn't show again the issues mentioned above. They seem to be a 
side-effect of migration.

Maybe reflashing the very old boot loader once resets everthing to a state
that an upgrade to the new one becomes possible or at least does not fail.

So we still don't know why it failed for you, but we seem to have a procedure
to switch back and forth (using two µSD cards with old and latest boot-loader 
built with current makesd).

> Let's say I have created a sd card with an old boot image and want to test it.
> > See: http://projects.goldelico.com/p/gta04-main/downloads/54/
> In the document behind the link is written for "AUX pressed" with "NAND 
> flashed and MMC installed": It does "MLO:MMC". I assume that is the case I 
> need ot flash from sd card.

Yes, so that it does not try to run a broken or bad MLO from NAND.

> Does it mean that I have to
> - remove usb cable and battery
> - put the sd card in the gta04
> - press and hold aux button
> - insert battery
> - and release aux button when something from the sd was loaded (a menu, red 
> screen etc.)
> Is the assumption correct?

Yes, exactly.

And I recognize that this mail contains a lot of material for a HowTo page. 
Anyone here with a public blog?

BR,
Nikolaus

_______________________________________________
Gta04-owner mailing list
Gta04-owner@goldelico.com
http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner

Reply via email to