GL300A Remote Controller help

Would also be great to understand the difference between files. Like what is ubl1.img and u-boot.img? Whats the name of the kernel image?

Im pretty sure I flashed the bootsloader with this command:
sfh.exe -nandflash -v -p "COM5" ubl1.img u-boot.img

Is that assumtion correct? And why 2 image files? Are both bootloaders?

Sorry for all these questions, and again thanks for all your help!
 
Do you think it works now, even though its booting recovery kernel?

Recovery kernel will not transmit video on any firmware not older than two years. For older FWs - maybe, not sure.

Would also be great to understand the difference between files. Like what is ubl1.img and u-boot.img?
These store Texas Instruments modification of U-boot.

Whats the name of the kernel image?

The names are mentioned on the wiki which you should have read already:
Flashing firmware on DaVinci media processors · mefistotelis/phantom-firmware-tools Wiki · GitHub

Im pretty sure I flashed the bootsloader with this command:
sfh.exe -nandflash -v -p "COM5" ubl1.img u-boot.img
Is that assumtion correct?
Yes. The wiki does explain that too.

And why 2 image files? Are both bootloaders?

These are two different parts of U-boot. Why is u-boot divided like this - you have to read about u-boot architecture to learn that.
 
Thanks. Im pretty sure I understand now. I have read the pages countless times, and finally they start making sense.

Ok, lets see if this is correct..

I need to get the firmware file. Download it from one of the links on the page you linked to.

Then I need to extract the m1300 kernel module named uImage. This is done using a git command and some python scripting. This can be done in msys2.

Then I put the file on a usb stick and start up the usb board. On boot I press escape i my terminal program tera term, and then I flash the kernel from usb to dram using the commands from the page you just linked to.

Am I on the right track now?
 
Am I on the right track now?

All you wrote is correct, but there is some gray area in this part:

Then I need to extract the m1300 kernel module named uImage. This is done using a git command and some python scripting. This can be done in msys2.

When you extract the module m1300, you get the whole m1300 update file. this file is encrypted. You need to decrypt it, extact files within and prepare the files for flashing (though kernel doesn't require additional preparations). Again, everything is on the wiki:
Firmware m1300 · mefistotelis/phantom-firmware-tools Wiki · GitHub
 
So you mean: undecrypt it with openssl and un-gzip it. But not remove the first bytes like with the boot images?
 
Ok. Great info.

I think it will be easier to just get linux if all those commands and programs comes build in.

Thanks a lot for your time and efford. I will update the thread with my progress or lack thereoff. I do hope you will stick around.
 
Loonie. Im installing Linux on an old laptop right now. If I succeed figuring this out, I will share the kernel file with you!
 
Having trouble. It doesn't know the git command, and its impossible for me to install the package since its an old Linux version. Trying a newer Linux...
 
Had to switch to a faster laptop this morning, but I have Linux running and have extracted the files.
I have ubl, u-boot and uImage for both the m0800 and m1300 modules. (usb board and gimbal board).

For the usb board I could only find and download the 1.06.000 version, so I hope that's ok.
Send me your emailaddress loonie, and I will send you the files. Im planning on flashing the kernel to both usb board and gimbal board tonight, so you might want to wait for my results :)
 
  • Like
Reactions: loonie01
Pretty sure I nailed it, but havn't tried the board in the controller yet.

This what I get now:

DM36x initialization passed!
UBL Product Vesion : DJI-GSP-UBL-1.0-rc10(2014-08-15)
Dji UBL Version: 1.51(Aug 15 2014 - 17:05:12)
Booting Catalog Boot Loader
BootMode = NAND
Starting NAND Copy...
Valid magicnum, 0xA1ACED66, found in block 0x00000019.
Uboot Checksum:0x7E25B44B
Actua Checksum:0x7E25B44B

U-Boot Product Vesion : DJI-GSP-Uboot-1.0-rc4(2014-07-23)
U-Boot 2010.12-rc2-svn-Dji (Jul 23 2014 - 11:14:40)
Cores: ARM 432 MHz
DDR: 297 MHz
I2C: ready
DRAM: 128 MiB
NAND: 128 MiB
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
*** Warning - bad CRC, using default environment

Net: Ethernet PHY: GENERIC @ 0xff
DaVinci-EMAC
Press ESC to abort autoboot in 1 seconds

Loading from nand0, offset 0x4a0000
Image Name: Linux-2.6.32.17-davinci1
Created: 2015-06-23 9:37:05 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4065664 Bytes = 3.9 MiB
Load Address: 80008000
Entry Point: 80008000
## Booting kernel from Legacy Image at 80700000 ...
Image Name: Linux-2.6.32.17-davinci1
Created: 2015-06-23 9:37:05 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4065664 Bytes = 3.9 MiB
Load Address: 80008000
Entry Point: 80008000
Loading Kernel Image ... OK
OK

Starting kernel ...

[ 0.000000] Kernel Product Vesion : DJI-GRC-Kernel-1.1-rc0(2015-06-23)
[ 0.000000] Linux version 2.6.32.17-davinci1 (root@dji) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #6 PREEMPT Tue Jun 23 17:37:03 HKT 2015
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] Machine: DaVinci DM36x EVM
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] DaVinci dm36x_rev1.2 variant 0x8
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping off. Total pages: 12192
[ 0.000000] Kernel command line: console=ttyS0,115200n8 rw dm365_imp.oper_mode=0 video=davincifb:vid0=0,10K:vid1=0,10K:eek:sd0=1920x1080X16,8100K mem=48MB davinci_enc_mngr.ch0_output=COMPOSITE davinci_enc_mngr.ch0_mode=pal ubi.mtd=2,2048 root=ubi0:rootfs rootfstype=ubifs ip=off lpj=1077248
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 48MB = 48MB total
[ 0.000000] Memory: 44424KB available (3672K code, 444K data, 116K init, 0K highmem)
[ 0.000000] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] NR_IRQS:245
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] Calibrating delay loop (skipped) preset value.. 215.44 BogoMIPS (lpj=1077248)
[ 0.000000] Mount-cache hash table entries: 512
[ 0.000000] CPU: Testing write buffer coherency: ok
[ 0.000000] DaVinci: 8 gpio irqs
[ 0.000000] NET: Registered protocol family 16
[ 0.110000] bio: create slab <bio-0> at 0
[ 0.110000] DM365 IPIPE initialized in Continuous mode
[ 0.110000] SCSI subsystem initialized
[ 0.120000] usbcore: registered new interface driver usbfs
[ 0.120000] usbcore: registered new interface driver hub
[ 0.120000] usbcore: registered new device driver usb
[ 0.130000] vpss vpss: dm365_vpss vpss probed
[ 0.130000] vpss vpss: dm365_vpss vpss probe success
[ 0.130000] ch0 default output "COMPOSITE", mode "PAL"
[ 0.130000] pinmux1:0x00145555
[ 0.130000] VPBE Encoder Initialized
[ 0.130000] cfg80211: Using static regulatory domain info
[ 0.130000] cfg80211: Regulatory domain: US
[ 0.130000] (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 0.130000] (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
[ 0.130000] (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[ 0.140000] (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[ 0.140000] (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[ 0.140000] (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[ 0.140000] (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
[ 0.140000] cfg80211: Calling CRDA for country: US
[ 0.140000] Switching to clocksource timer0_1
[ 0.140000] musb_hdrc: version 6.0, pio, host, debug=0
[ 0.160000] musb_hdrc: USB Host mode controller at fec64000 using PIO, IRQ 12
[ 0.160000] musb_hdrc musb_hdrc: MUSB HDRC host driver
[ 0.160000] musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
[ 0.160000] usb usb1: configuration #1 chosen from 1 choice
[ 0.160000] hub 1-0:1.0: USB hub found
[ 0.160000] hub 1-0:1.0: 1 port detected
[ 0.160000] NET: Registered protocol family 2
[ 0.160000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.160000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.160000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.160000] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.160000] TCP reno registered
[ 0.160000] NET: Registered protocol family 1
[ 0.160000] RPC: Registered udp transport module.
[ 0.160000] RPC: Registered tcp transport module.
[ 0.160000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.170000] kfile init
[ 0.170000] JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.170000] msgmni has been set to 86
[ 0.180000] alg: No test for stdrng (krng)
[ 0.180000] io scheduler noop registered (default)
[ 0.210000] davincifb davincifb.0: dm_osd0_fb: Initial window configuration is invalid.
[ 0.220000] davincifb davincifb.0: dm_osd0_fb: 1920x1080x16@0,0 with framebuffer size 8100KB
[ 0.220000] davincifb davincifb.0: dm_vid0_fb: 0x0x16@0,0 with framebuffer size 10KB
[ 0.230000] davincifb davincifb.0: dm_osd1_fb: Initial window configuration is invalid.
[ 0.240000] davincifb davincifb.0: dm_osd1_fb: 1920x1080x4@0,0 with framebuffer size 4050KB
[ 0.240000] davincifb davincifb.0: dm_vid1_fb: 0x0x16@0,0 with framebuffer size 10KB
[ 0.300000] venc off init
[ 0.300000] hdmi status init
[ 0.300000] DM365 IPIPEIF probed
[ 0.310000] imp serializer initialized
[ 0.310000] davinci_previewer initialized
[ 0.310000] davinci_resizer initialized
[ 0.310000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.310000] serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
[ 0.780000] console [ttyS0] enabled
[ 0.780000] serial8250.0: ttyS1 at MMIO 0x1d06000 (irq = 41) is a 16550A
[ 0.790000] brd: module loaded
[ 0.800000] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xf1 (Micron NAND 128MiB 3,3V 8-bit)
[ 0.810000] Creating 4 MTD partitions on "davinci_nand.0":
[ 0.820000] 0x000000000000-0x0000004a0000 : "bootloader"
[ 0.830000] 0x0000004a0000-0x000000e00000 : "kernel"
[ 0.830000] 0x000000e00000-0x000007f00000 : "filesystem"
[ 0.840000] 0x000000000000-0x000008000000 : "all"
[ 0.850000] davinci_nand davinci_nand.0: controller rev. 2.3
[ 0.860000] UBI: attaching mtd2 to ubi0
[ 0.860000] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 0.870000] UBI: logical eraseblock size: 126976 bytes
[ 0.880000] UBI: smallest flash I/O unit: 2048
[ 0.880000] UBI: sub-page size: 512
[ 0.890000] UBI: VID header offset: 2048 (aligned 2048)
[ 0.890000] UBI: data offset: 4096
[ 1.060000] usb 1-1: new high speed USB device using musb_hdrc and address 2
[ 1.210000] usb 1-1: configuration #1 chosen from 1 choice
[ 1.210000] hub 1-1:1.0: USB hub found
[ 1.230000] hub 1-1:1.0: 2 ports detected
[ 1.410000] UBI: attached mtd2 to ubi0
[ 1.410000] UBI: MTD device name: "filesystem"
[ 1.420000] UBI: MTD device size: 113 MiB
[ 1.420000] UBI: number of good PEBs: 904
[ 1.430000] UBI: number of bad PEBs: 0
[ 1.430000] UBI: max. allowed volumes: 128
[ 1.430000] UBI: wear-leveling threshold: 4096
[ 1.440000] UBI: number of internal volumes: 1
[ 1.440000] UBI: number of user volumes: 1
[ 1.450000] UBI: available PEBs: 0
[ 1.450000] UBI: total number of reserved PEBs: 904
[ 1.460000] UBI: number of PEBs reserved for bad PEB handling: 9
[ 1.460000] UBI: max/mean erase counter: 115/1
[ 1.470000] UBI: image sequence number: 268688541
[ 1.470000] UBI: background thread "ubi_bgt0d" started, PID 342
[ 1.480000] console [netcon0] enabled
[ 1.490000] netconsole: network logging started
[ 1.490000] Initializing USB Mass Storage driver...
[ 1.500000] usbcore: registered new interface driver usb-storage
[ 1.500000] USB Mass Storage support registered.
[ 1.510000] usbcore: registered new interface driver usbtest
[ 1.510000] i2c /dev entries driver
[ 1.520000] Linux video capture interface: v2.00
[ 1.530000] vpfe-capture: vpss clock vpss_master enabled
[ 1.540000] vpfe-capture vpfe-capture: v4l2 device registered
[ 1.540000] vpfe-capture vpfe-capture: video device registered
[ 1.550000] No sub devices registered
[ 1.560000] Trying to register davinci display video device.
[ 1.560000] layer=c17f7000,layer->video_dev=c17f7164
[ 1.570000] Trying to register davinci display video device.
[ 1.570000] layer=c17f7400,layer->video_dev=c17f7564
[ 1.580000] davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
[ 1.590000] watchdog watchdog: heartbeat 1 sec
[ 1.590000] usbcore: registered new interface driver usbmouse
[ 1.600000] usbmouse: v1.6:USB HID Boot Protocol mouse driver
[ 1.600000] TCP cubic registered
[ 1.610000] NET: Registered protocol family 17
[ 1.610000] lib80211: common routines for IEEE802.11 drivers
[ 1.620000] ksocket init
[ 1.640000] encrypt device:atsha204 found
[ 1.740000] mfi_i2c_client addr:17
[ 1.740000] Clocks: disable unused mmcsd0
[ 1.740000] Clocks: disable unused mmcsd1
[ 1.740000] Clocks: disable unused spi0
[ 1.740000] Clocks: disable unused spi1
[ 1.740000] Clocks: disable unused spi2
[ 1.740000] Clocks: disable unused spi3
[ 1.740000] Clocks: disable unused spi4
[ 1.740000] Clocks: disable unused pwm0
[ 1.740000] Clocks: disable unused pwm1
[ 1.740000] Clocks: disable unused pwm2
[ 1.740000] Clocks: disable unused pwm3
[ 1.740000] Clocks: disable unused timer1
[ 1.740000] Clocks: disable unused timer3
[ 1.740000] Clocks: disable unused emac
[ 1.740000] Clocks: disable unused voice_codec
[ 1.740000] Clocks: disable unused asp0
[ 1.740000] Clocks: disable unused rto
[ 1.740000] Clocks: disable unused mjcp
[ 1.820000] davinci_emac_probe: using random MAC addr: 9a:41:11:0a:e0:4d
[ 1.830000] emac-mii: probed
[ 1.870000] UBIFS: recovery needed
[ 1.950000] UBIFS: recovery completed
[ 1.950000] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[ 1.960000] UBIFS: file system size: 110342144 bytes (107756 KiB, 105 MiB, 869 LEBs)
[ 1.960000] UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
[ 1.970000] UBIFS: media format: w4/r0 (latest is w4/r0)
[ 1.980000] UBIFS: default compressor: lzo
[ 1.980000] UBIFS: reserved for root: 0 bytes (0 KiB)
[ 1.990000] VFS: Mounted root (ubifs filesystem) on device 0:13.
[ 1.990000] Freeing init memory: 116K

Filesystem Product Vesion : DJI-Filesystem-1.0-rc2
Runing /etc/init.d/rcS
[ 3.790000] CMEMK module: built on Jul 30 2014 at 10:21:45
[ 3.790000] Reference Linux version 2.6.32
[ 3.800000] File /home/u/work/svn/dec_grc/src/dvsdk/dvsdk_dm368_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
[ 3.840000] allocated heap buffer 0xc7000000 of size 0x4400000
[ 3.840000] heap fallback enabled - will try heap if pool buffer is not available
[ 3.850000] CMEM Range Overlaps Kernel Physical - allowing overlap
[ 3.860000] CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83000000)
[ 3.860000] cmemk initialized
[ 3.890000] IRQK module: built on Jul 30 2014 at 10:21:09
[ 3.910000] Reference Linux version 2.6.32
[ 3.910000] File /home/u/work/svn/dec_grc/src/dvsdk/dvsdk_dm368_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/irq/src/module/irqk.c
[ 3.930000] irqk initialized
[ 3.980000] EDMAK module: built on Jul 30 2014 at 10:19:34
[ 4.000000] Reference Linux version 2.6.32
[ 4.000000] File /home/u/work/svn/dec_grc/src/dvsdk/dvsdk_dm368_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/edma/src/module/edmak.c
[ 4.230000] exFAT: Version 1.2.9
settime failed
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[ 11.850000] usbcore: registered new interface driver usb_applehid
[ 11.870000] usb applehid module init ok
[ 11.910000] usbcore: registered new interface driver usb_68013
[ 11.940000] usb 68013 module init ok
sulogin: no password entry for root
login[494]: root login on 'ttyS0'
#Process /etc/profile...
root@Dji-Pro:~# encrypt check ok
init libusb successed!!!
usbmuxd disabled
usbsocket_init OK
usbsocket_create_handle ok, port:22345, bCanRecv:1
usbsocket_create_handle ok, port:22346, bCanRecv:0
watchdog timeout:5
DummyRead68013 0.000000kb
umount: can't umount /mnt/usb: No such file or directory
rmdir: '/mnt/usb': No such file or directory
DummyRead68013 0.000000kb
DummyRead68013 0.000000kb
DummyRead68013 0.000000kb
DummyRead68013 0.000000kb
DummyRead68013 0.000000kb
encrypt chip exist
DummyRead68013 0.000000kb
DummyRead68013 0.000000kb
DummyRead68013 0.000000kb
DummyRead68013 0.000000kb
DummyRead68013 0.000000kb
DummyRead68013 0.000000kb
DummyRead68013 0.000000kb
 
Just flashed my P3P gimbal topboard also. This time I had to use yModem to transfer the kernel file, but it wasn't a problem. Only took like 10 minutes.

quaddamage, thanks for all your help. You just learned a windows dummy to use Linux!
 
  • Like
Reactions: quaddamage
Hey quaddamage. Im not sure what you mean with "whole image", but I guess there are other things in nand besides the bootsloader and kernel. The recovery kernel maybe?

Anyway, sure I would like to help. I will have a look for a usb cable with a female plug, and get back to you!
 
I guess there are other things in nand besides the bootsloader and kernel. The recovery kernel maybe?

Most of the NAND area is taken by the root filesystem. There is memory map of the NAND on the-most-quoted-wiki:
Firmware m0800 · mefistotelis/phantom-firmware-tools Wiki · GitHub

When the DaVinci linux ends startup, do:
Code:
stop

This will prevent it from focusing on image transcoding and spewing statistics.

When you connect the sd-card, you should be able to see its related file:
Code:
ls /dev/sd*

If you can't see it, check whether the system even noticed that something is connected:
Code:
dmesg

If you can see the "/dev/sda" file, go to dumping:
Code:
cd /tmp; mkdir sdcard
mount /dev/sda sdcard
dd if=/dev/mtd3 of=sdcard/whole_nand_image.bin bs=1048576

Hopefully "mtd3" is mapped as a whole NAND, and you'll get a 128MB file on the sd-card after this command.
 
Last edited:
OK. I just pulled apart an old laptop to get a female usb connector. I need to find a pinout and solder it to my board. Will do that later tonight or tomorrow.

Im not sure when I should type stop. It it when it does the dummyread?
(I thought I should press escape, like when I flashed the kernel)
 

Recent Posts

Members online

Forum statistics

Threads
143,127
Messages
1,467,801
Members
105,012
Latest member
TimCJWolfe