LK-7900 AC25->AC27 update turned camera into brick

In the nand, there are two data partitions, which get mounted as nand1 and nand2 after Linux has booted.
The config.bin file ends up getting copied to nand1. I'm fairly sure that these partitions do not get touched when the bootable SD cards are used to reprogram.

I know that after doing a chip erase of the nand, installing from the bootable SD, the nand partitions are automatically initialised.
I also know that the bootable SD card does not perform a chip erase, instead it erases only what is needed to put the firmware components into the correct locations.

The only way I currently know of doing a chip erase is via the debug Port.
After fully erasing the nand, the RBL will automatically try to boot off the SD card without having to press and hold m on startup.

I would like to modify SDBoot to make it do a chip erase. But this is potentially dangerous because if the process goes wrong, the device could enter a boot loop, automatically booting off the SD card, repeatedly erasing the nand.
After not to long the nand will be burnt out.

I'm going to have to look at recompiling SDBoot to add the extra functionality.
This still does not solve the problem with the wrong firmware version being displayed.

I have a feeling that I'll be taking the camera back out of the car, and moving those surface mount resistors after all.

EDIT:
I've confirmed that SDBoot does erase the entire nand flash memory before reprogramming the firmware.
 
Last edited:
sweetthunder: Please can you confirm that the SHA256 sum of your created AC31 bootable SD card image is

c4a8c4a0b5467dce9bb64cbb81b8550c7319e854b31dea77ba624091abb474dd
 
Although I have not got the LK7900 in front of me right now, I have been able to do some more investigation into the outstanding problem with the incorrect firmware version being displayed.
I'm still not sure why sweetthunder's LK7900 is still unable to boot, that is assuming sweetthunder has the same SHA256 checksum for the generated SD card image.
I've double checked the partition mappings for the MTD, and confirmed that the data is being loaded to the correct addresses and is not being truncated.

Here is the AC31 partition layout
0x00000000-0x003c0000 : "bootloader"
0x003c0000-0x00620000 : "params"
0x00620000-0x00920000 : "kernel"
0x00920000-0x03120000 : "filesystem"
0x03800000-0x04800000 : "data1"
0x06000000-0x08000000 : "data2"


I've not done any further experiments with the LK7900, but based on information I've found by studying the various firmware components, I believe the firmware version is displayed on startup by UBoot.
There is evidence inside the image file that UBoot has been heavily customised by PixTree:
$ strings AC23_UBoot.bin | grep pxtr | sort -u
pxtr_buzzer_on
pxtr_erase_fw
pxtr_fw_upgrade_chek
pxtr_fw_upgrad_main
pxtr_load_fw
pxtr_load_nand_fwinfo ****This looks interesting****
pxtr_mmc_init
pxtr_set_eraseflag
pxtr_write_file
pxtr_write_fw
pxtr_write_nand_fwinfo ****So does this****

So it looks like UBoot is heavily involved with the firmware update process.

Also there are a few errors being thrown out when UBoot loads:
U-Boot 2010.12-rc2 (Nov 15 2013 - 09:56:36)
...
*** Warning - bad CRC, using default environment
...
pxtr_fw_upgrad_main:588] Firmware info into the nand is not initialized.
pxtr_mmc_init:108] call mmc_init()
## Unknown partition table
** Partition 1 not valid on device 0 **
reading sleepf.txt

** Unable to read "sleepf.txt" from mmc 0:0 **
** Partition 1 not valid on device 0 **
reading firmware

** Unable to read "firmware" from mmc 0:0 **
pxtr_fw_upgrad_main:741] fw file is not exist
** Partition 1 not valid on device 0 **
reading updatef.txt

** Unable to read "updatef.txt" from mmc 0:0 **
sFWheader_nand.version=0 0 0 0
main_loop:401] bootdelay=0 userdelay_f=0
Hit any key to stop autoboot: 0


This looks to me as if UBoot is trying to load some files from the SDCard in order to configure the firmware version.
The bad partition table errors were because I didn't have an SD card inserted when the LK7900 booted up.
I'm not sure of the format of these txt files.

I'm also interested in what the "params" partition is for. I have seen partitions with this name on Android devices, and they are generally used by the bootloaders for storing the configuration parameters.
This TI page also indicates that params is for the bootloader paramters.
http://processors.wiki.ti.com/index.php/Get_FFS_partition_configuration

If I remember, for some reason this partition is not writable from within linux, so it may be that the userspace firmware updater has to dump the data into a file on the SD card, then reboot and let UBoot modify the parameters within the partition.
This is purely speculation.

Has anyone seen the files sleepf.txt and updatef.txt left behind on an SD card after a firmware update?
 
echo -n ac31.img | sha256sum
ff1d0b24fefb31e97a954704e473be3221209febde099483c69cfd9f7d9887c3

Source files:
- Firmware - http://www.lukashd.com/gnuboard4/bbs/board.php?bo_table=eng_firmware&wr_id=28
- AC23_UBLSDBoot_modified.bin (original)
- AC23_TestPatterns.bin

Then something turned out, I ordered your DVR from Korea, in the store, he was positioned as Lukas LK-7900 ACE. But now I found that I do not have GPS. that the box - Lukas LK-7900 APA, manual - Lukas LK-7900 APA, the serial number starts with LK-7900D-...
That judging by the article - http://lukashd.com/gnuboard4/bbs/board.php?bo_table=02_01&wr_id=92, too - Lukas LK-7900 ARA. But can on the original SD software and manual from Lukas LK-7900 ACE.

There are other firmware other than AC31 for LK-7900 ARA - http://lukashd.com/gnuboard4/bbs/board.php?bo_table=03_02. May need to use them.
 
Last edited:
Adjust the firmware OA31 tried again on a loop Upda. But after the restart found display the OA31 ... Next DVR refused to run.

Create bootloader image SD from OA31, update device, DVR functions, but displayed AC25.
 
Last edited:
echo -n ac31.img | sha256sum
ff1d0b24fefb31e97a954704e473be3221209febde099483c69cfd9f7d9887c3

Please can you try creating the sha256sum of the contents of the sd card image file. Using the command;
$ sha256sum ac31.img
 
c4a8c4a0b5467dce9bb64cbb81b8550c7319e854b31dea77ba624091abb474dd
 
I've confirmed by looking a bit closer at the code, that the firmware version is displayed by UBoot. It loads the version string from the parameter area and displays it before the Linux kernel is loaded.

Uboot has a hard coded default value if the string cannot be loaded from the parameter area. In Uboot included with AC31, the default string is Ac25.

I don't think this issue should affect the operation of the firmware in any way. My LK7900 is now working quite well despite this minor problem.
 
I've just done my LK-7900 from AC25 to AC31 everything went as to plan which is a surprise for me as normally if it can go wrong it will :)

I think the problems people are having may have something to do with using high capacity SD cards. I purposely used the 8Gb card that Lukas supplied with the camera.
 
I think the problems people are having may have something to do with using high capacity SD cards. I purposely used the 8Gb card that Lukas supplied with the camera.

I have also been using the supplied Lukas SD card. I started to suspect that it may be the cause of some of the problems, but haven't been able to find anything wrong with it.
 
I have also been using the supplied Lukas SD card. I started to suspect that it may be the cause of some of the problems, but haven't been able to find anything wrong with it.


Craig I use a 32Gb one for normal use I just used the 8Gb lukas on to carry out the update.
 
Just a quick update. As my LK7900 is now functional, I haven't spent much time hacking it. It still displays AC25 on boot, although I know this to be just a default value within the UBoot bootloader if it doesn't know what firmware version is installed.
I know I'm using AC31, so I'm not that bothered by this erroneous display.

I've now moved the resistors on the PCB, so the debug port is wired to the USB connector. This should make debugging easier as I nolonger need to open up the device to gain access to the port.
One thing I did find, the USB connector is "Incorrectly" wired within the LK7900. Lukas appear to have made a connection to the Data+ and ID pin instead of Data+ and Data-. So a special cable will be needed if you want to use the USB functionality of the device. Not that it has any that I know of.

I've not had that much time to play around this evening, but focusing on the UBoot boot loader, I've discovered the following.
If you create an empty file called "sleepf.txt" on the SD Card, UBoot will delay for 5 seconds when the device is switched on, and will allow access to the bootloader command line if a key is pressed within this time period.

It is possible to modify the UBoot environment variables from within the UBoot command shell, and the variable "bootdelay" can then be modified to set the boot delay without needing to have a sleepf.txt file.
The environment can be saved to the parameter area from within UBoot. After saving, the following boot up warning message:

*** Warning - bad CRC, using default environment

will no-longer appear on the console during the boot process.
I still have the following warnings on boot, which I believe are causing the wrong firmware version to be displayed on the segmented LED display:

pxtr_fw_upgrad_main:588] Firmware info into the nand is not initialized.
sFWheader_nand.version=0 0 0 0

Finally, I've discovered that the firmware upgrade process is performed by the UBoot boot loader. After upgrading the firmware, UBoot tries to delete the firmware files on the SD card before rebooting.
I've noticed that this often fails, and after rebooting UBoot once again finds the firmware files on the SD card and performs the update.
Also I've noticed that UBoot's attempt to delete the firmware files on the SD card, results in filesystem corruption on the SD card.

I'll post more info as I find it.

Regards,
Craig
 
Hi,
I've updated the fimware tools for the LK7900. This fixes the problem with the incorrect firmware version being displayed during boot up.
The bootloader parameter partition is now fully initialised as part of the reprogramming process.

Instructions are given within the Readme.txt file.

Please use at your own risk.

Regards,
Craig
 

Attachments

  • LukasFirmwareTools_20140119.zip
    22.4 KB · Views: 27
Thank you for your effort. Hopefully I won't need this soon.
 
Hi,
I've updated the fimware tools for the LK7900. This fixes the problem with the incorrect firmware version being displayed during boot up.
The bootloader parameter partition is now fully initialised as part of the reprogramming process.

Instructions are given within the Readme.txt file.

Please use at your own risk.

Regards,
Craig

I'm resurrecting this thread to say thank you! I recovered my bricked LK7900 to AC31 using the 20140119 Lukas Firmware Tools you provided. Thank you SO much!
 
Thank you soo much. I was also able to fix my paper weight Lukas 7900 ACE.
You guys are awesome! ( I could not get the firmware tools to work, I'm not familiar with linux). But I used the image provided and worked, then I updated as usual to AC31.
 
Back
Top