Dafang-Hacks / uboot

Other
23 stars 16 forks source link

Instructions to build the project #8

Open hansaya opened 5 years ago

hansaya commented 5 years ago

After trying to understand why https://github.com/Dafang-Hacks/uboot/issues/4 was happening. I realized flash installed on my waze cam was QH128A-104HIP http://pdf1.alldatasheet.com/datasheet-pdf/view/675884/EON/EN25QH128A.html

Because of that I get

the id code = 1c7018
unsupport ID is if the id not be 0x00,the flash is ok for burner
the manufacturer 1c
SF: Detected FM25Q64

at start up. My guess is, new entry needed to be added to https://github.com/Dafang-Hacks/uboot/blob/a1d19316522425d61035a9e897e9d8b0424b7f74/drivers/spi/jz_spi.h

I'm alright with doing the work and testing it but I got stuck building the project. I used a ubuntu container to build it but I had no luck. I know that this version of uboot is using old gcc-4-mips-linux-gnu but i wasn't able install anything less than version 5. I tried to compile with version 5 without any success. Do you have a proven way of building this project? and tools needed to build it?

I'm stuck with this build error

mips-linux-gnu-ld.bfd: /usr/lib/gcc-cross/mips-linux-gnu/5/libgcc.a(_lshrdi3.o): compiled for a big endian system and target is little endian
mips-linux-gnu-ld.bfd: /usr/lib/gcc-cross/mips-linux-gnu/5/libgcc.a(_lshrdi3.o): endianness incompatible with that of the selected emulation
mips-linux-gnu-ld.bfd: failed to merge target specific data of file /usr/lib/gcc-cross/mips-linux-gnu/5/libgcc.a(_lshrdi3.o)
mips-linux-gnu-ld.bfd: /usr/lib/gcc-cross/mips-linux-gnu/5/libgcc.a(_ashldi3.o): compiled for a big endian system and target is little endian
mips-linux-gnu-ld.bfd: /usr/lib/gcc-cross/mips-linux-gnu/5/libgcc.a(_ashldi3.o): endianness incompatible with that of the selected emulation
mips-linux-gnu-ld.bfd: failed to merge target specific data of file /usr/lib/gcc-cross/mips-linux-gnu/5/libgcc.a(_ashldi3.o)

Thanks

EliasKotlyar commented 5 years ago

Hello @hansaya ,

You should try the following SDK(in Main repository): https://github.com/Dafang-Hacks/mips-gcc472-glibc216-64bit/tree/81cb9f1e63d1abebf8a9a51efb95b6b3a78d9924

However : What exactly is the problem with the provided ones? I tried to read #4, but i am not sure where exactly you are stuck?

hansaya commented 5 years ago

Issue I was having was, uboot recognizing my SPI flash chip as FM25Q64. Which is an 64Mbit flash chip. 64mb not enough to install full firmware. My guess is Waze switched out the flash chip to save money. Now my waze cam pan contains QH128A-104HIP chip and it has Id code of 1c7018, which is not defined under https://github.com/Dafang-Hacks/uboot/blob/a1d19316522425d61035a9e897e9d8b0424b7f74/drivers/spi/jz_spi.h

hansaya commented 5 years ago

Thank you for the compiled tool set. I was able to fix my issue by adding a new entry to the header file.