OpenWrt Forum Archive

Topic: U-Boot mod for routers with AR9331/AR9344

The content of this topic has been archived between 3 Apr 2015 and 7 May 2018. Unfortunately there are posts – most likely complete pages – missing.

290923628 wrote:

Hi,pepe2k:
I want Use USB to update the firmware ,How can I  add USB to the u-boot ??

Not possible

Hi all

is it possible to build this uboot mod from pepek with buildroot openwrt? so if we want to use this mod, we only choose it at menuconfig and compile it ?

Best regards

Riyadi

I have pepe2k's u-boot installed on two tp-link boxes (WR740N and MR10U) and I am not able to run into netconsole mode. uWeb is working (3 seconds after led blink after cold start), but I still cannot see how this netconsole is operating. I am holding the reset button pressed for the required time (~7 sec), but nothing happens - no ping to 192.168.1.1, no output seen on the terminal on which I start nc -u -p 6666 192.168.1.1 6666.

Is there something that I miss?

Make sure your PC is set to static 192.168.1.2 (not sure why, but I couldn't get it to work otherwise).

Edit: And note that in order to see something after "nc -u -p 6666 192.168.1.1 6666", you need to enter a command, such as "help[Enter]"

(Last edited by rambler on 15 Dec 2015, 19:20)

Hello,

Is it possible to post a compiled U-Boot image for wrt710n? I saw on your github that the router is supported, but I can't find a precompiled image of it.

Thanks a lot for your help, and good work!

Hello again, I wanted to install that mod on TP-Link WR841n v10, but looks like it is in different platform - Qualcomm Atheros QCA9533-BL3A
Is there any way I can adapt this mod for that hardware?

Hi,
I managed to destroy my tp-link wr941ndv4 router. I can´t access trhopugh serial console anymore. I believe I lost the bootloader.
There is anyway to write it again?
Thanks for any help,

thiago.simoes wrote:

Hi,
I managed to destroy my tp-link wr941ndv4 router. I can´t access trhopugh serial console anymore. I believe I lost the bootloader.
There is anyway to write it again?
Thanks for any help,

JTAG or SPI programmer, but if you don't have those already and you have another router from same model, then you can solder the flash to that one while it's running uboot console, tftpboot to get uboot image, write it, then solder it back.

Isn´t arduino an SPI programmer? If so do you think I can use it? You mean the AR9341 chip right?

***************************************
*     U-Boot 1.1.4-6b84b99a-dirty     *
*        Mar 22 2016, 00:09:15        *
***************************************

** Warning: bad env CRC, using default,
   use 'saveenv' to save it in FLASH

  BOARD: TP-Link TL-WR802N
    SOC: QCA953x ver. 1 rev. 1
    CPU: MIPS 24Kc
    RAM: 32 MB DDR1 16-bit CL3-3-3-8
  FLASH: 4 MB Winbond W25Q32
    MAC: 30:B5:C2:XX:XX:XX
 CLOCKS: CPU/RAM/AHB/SPI/REF
         550/400/200/ 25/ 25 MHz

Hit any key to stop autoboot: 0

uboot> setclk
Current configuration:
- CPU: 550 MHz
- RAM: 400 MHz
- AHB: 200 MHz
- SPI:  25 MHz
- REF:  25 MHz

Clocks in MHz, run 'setclk #' to select
one configuration from the below table:

    # [ ] | CPU | RAM | AHB | SPI
 ---------------------------------
    1 [ ] | 100 | 100 | 100 |  25
    2 [ ] | 125 | 100 | 100 |  25
    3 [ ] | 150 | 150 | 100 |  12
    4 [ ] | 150 | 150 | 150 |  12
    5 [ ] | 160 | 160 |  80 |  10
    6 [ ] | 170 | 170 |  85 |  10
    7 [ ] | 180 | 180 |  90 |  11
    8 [ ] | 200 | 200 | 100 |  12
    9 [ ] | 200 | 200 | 150 |  18
   10 [ ] | 200 | 200 | 200 |  25
   11 [ ] | 300 | 200 | 100 |  12
   12 [ ] | 300 | 200 | 150 |  18
   13 [ ] | 300 | 200 | 200 |  25
   14 [ ] | 300 | 300 | 100 |  12
   15 [ ] | 300 | 300 | 150 |  18
   16 [ ] | 300 | 300 | 200 |  25
   17 [ ] | 350 | 350 | 175 |  21
   18 [ ] | 360 | 360 | 180 |  22
   19 [ ] | 380 | 380 | 190 |  23
   20 [ ] | 400 | 200 | 100 |  12
   21 [ ] | 400 | 200 | 150 |  18
   22 [ ] | 400 | 200 | 200 |  25
   23 [ ] | 400 | 300 | 100 |  12
   24 [ ] | 400 | 300 | 150 |  18
   25 [ ] | 400 | 300 | 200 |  25
   26 [ ] | 400 | 300 | 300 |  25
   27 [ ] | 400 | 400 | 200 |  25
   28 [ ] | 400 | 400 | 300 |  25
   29 [ ] | 500 | 200 | 100 |  12
   30 [ ] | 500 | 200 | 150 |  18
   31 [ ] | 500 | 200 | 200 |  25
   32 [ ] | 500 | 300 | 100 |  12
   33 [ ] | 500 | 300 | 150 |  18
   34 [ ] | 500 | 300 | 200 |  25
   35 [ ] | 500 | 300 | 250 |  25
   36 [ ] | 500 | 300 | 300 |  25
   37 [ ] | 500 | 400 | 100 |  12
   38 [ ] | 500 | 400 | 200 |  25
   39 [ ] | 500 | 400 | 250 |  25
   40 [ ] | 500 | 500 | 100 |  12
   41 [ ] | 500 | 500 | 150 |  18
   42 [ ] | 500 | 500 | 200 |  25
   43 [ ] | 500 | 500 | 250 |  25
   44 [ ] | 500 | 500 | 300 |  25
   45 [ ] | 550 | 200 | 100 |  12
   46 [ ] | 550 | 200 | 150 |  18
   47 [ ] | 550 | 200 | 200 |  25
   48 [ ] | 550 | 300 | 100 |  12
   49 [ ] | 550 | 300 | 150 |  18
   50 [ ] | 550 | 300 | 200 |  25
   51 [ ] | 550 | 300 | 275 |  27
   52 [ ] | 550 | 300 | 300 |  25
   53 [ ] | 550 | 375 | 250 |  25
   54 [ ] | 550 | 400 | 200 |  25
   55 [ ] | 560 | 450 | 225 |  28
   56 [ ] | 600 | 200 | 100 |  12
   57 [ ] | 600 | 200 | 150 |  18
   58 [ ] | 600 | 200 | 200 |  25
   59 [ ] | 600 | 300 | 100 |  12
   60 [ ] | 600 | 300 | 150 |  18
   61 [ ] | 600 | 300 | 200 |  25
   62 [ ] | 600 | 300 | 250 |  25
   63 [ ] | 600 | 300 | 300 |  25
   64 [ ] | 600 | 400 | 100 |  12
   65 [ ] | 600 | 400 | 150 |  18
   66 [ ] | 600 | 400 | 200 |  25
   67 [ ] | 600 | 400 | 300 |  25
   68 [ ] | 600 | 450 | 100 |  12
   69 [ ] | 600 | 450 | 150 |  18
   70 [ ] | 600 | 450 | 200 |  25
   71 [ ] | 600 | 450 | 225 |  28
   72 [ ] | 600 | 450 | 300 |  25
   73 [ ] | 600 | 500 | 100 |  12
   74 [ ] | 600 | 500 | 150 |  18
   75 [ ] | 600 | 500 | 200 |  25
   76 [ ] | 600 | 500 | 250 |  25
   77 [ ] | 600 | 500 | 300 |  25
   78 [ ] | 600 | 550 | 100 |  12
   79 [ ] | 600 | 550 | 150 |  18
   80 [ ] | 600 | 550 | 200 |  25
   81 [ ] | 600 | 550 | 275 |  27
   82 [ ] | 600 | 550 | 300 |  25
   83 [ ] | 600 | 600 | 100 |  12
   84 [ ] | 600 | 600 | 150 |  18
   85 [ ] | 600 | 600 | 200 |  25
   86 [ ] | 600 | 600 | 250 |  25
   87 [ ] | 600 | 600 | 300 |  25
   88 [ ] | 620 | 200 | 100 |  12
   89 [ ] | 620 | 200 | 150 |  18
   90 [ ] | 620 | 200 | 200 |  25
   91 [ ] | 620 | 300 | 100 |  12
   92 [ ] | 620 | 300 | 150 |  18
   93 [ ] | 620 | 300 | 200 |  25
   94 [ ] | 620 | 300 | 300 |  25
   95 [ ] | 620 | 400 | 100 |  12
   96 [ ] | 620 | 400 | 155 |  19
   97 [ ] | 620 | 400 | 200 |  25
   98 [ ] | 620 | 400 | 310 |  25
   99 [ ] | 620 | 500 | 100 |  12
  100 [ ] | 620 | 500 | 155 |  19
  101 [ ] | 620 | 500 | 166 |  20
  102 [ ] | 620 | 500 | 206 |  25
  103 [ ] | 620 | 500 | 250 |  25
  104 [ ] | 620 | 500 | 310 |  25
  105 [ ] | 650 | 400 | 200 |  25
  106 [ ] | 650 | 420 | 210 |  26
  107 [ ] | 650 | 450 | 225 |  28

[*] profile currently stored in FLASH

** Notice:
   configuration is stored in FLASH at: 0x9F01FFE0
   magic value is: 0x504C4C73, block size is: 24 B

** Notice:
   you should always make a backup of your devices
   entire FLASH content, before making any changes

uboot>

Just to let you know that the project is not dead: https://github.com/pepe2k/u-boot_mod/commits/master

pepe2k wrote:
***************************************
*     U-Boot 1.1.4-6b84b99a-dirty     *
*        Mar 22 2016, 00:09:15        *
***************************************

** Warning: bad env CRC, using default,
   use 'saveenv' to save it in FLASH

  BOARD: TP-Link TL-WR802N
    SOC: QCA953x ver. 1 rev. 1
    CPU: MIPS 24Kc
    RAM: 32 MB DDR1 16-bit CL3-3-3-8
  FLASH: 4 MB Winbond W25Q32
    MAC: 30:B5:C2:XX:XX:XX
 CLOCKS: CPU/RAM/AHB/SPI/REF
         550/400/200/ 25/ 25 MHz

Hit any key to stop autoboot: 0

uboot> setclk
Current configuration:
- CPU: 550 MHz
- RAM: 400 MHz
- AHB: 200 MHz
- SPI:  25 MHz
- REF:  25 MHz

Clocks in MHz, run 'setclk #' to select
one configuration from the below table:

    # [ ] | CPU | RAM | AHB | SPI
 ---------------------------------
    1 [ ] | 100 | 100 | 100 |  25
    2 [ ] | 125 | 100 | 100 |  25
    3 [ ] | 150 | 150 | 100 |  12
    4 [ ] | 150 | 150 | 150 |  12
    5 [ ] | 160 | 160 |  80 |  10
    6 [ ] | 170 | 170 |  85 |  10
    7 [ ] | 180 | 180 |  90 |  11
    8 [ ] | 200 | 200 | 100 |  12
    9 [ ] | 200 | 200 | 150 |  18
   10 [ ] | 200 | 200 | 200 |  25
   11 [ ] | 300 | 200 | 100 |  12
   12 [ ] | 300 | 200 | 150 |  18
   13 [ ] | 300 | 200 | 200 |  25
   14 [ ] | 300 | 300 | 100 |  12
   15 [ ] | 300 | 300 | 150 |  18
   16 [ ] | 300 | 300 | 200 |  25
   17 [ ] | 350 | 350 | 175 |  21
   18 [ ] | 360 | 360 | 180 |  22
   19 [ ] | 380 | 380 | 190 |  23
   20 [ ] | 400 | 200 | 100 |  12
   21 [ ] | 400 | 200 | 150 |  18
   22 [ ] | 400 | 200 | 200 |  25
   23 [ ] | 400 | 300 | 100 |  12
   24 [ ] | 400 | 300 | 150 |  18
   25 [ ] | 400 | 300 | 200 |  25
   26 [ ] | 400 | 300 | 300 |  25
   27 [ ] | 400 | 400 | 200 |  25
   28 [ ] | 400 | 400 | 300 |  25
   29 [ ] | 500 | 200 | 100 |  12
   30 [ ] | 500 | 200 | 150 |  18
   31 [ ] | 500 | 200 | 200 |  25
   32 [ ] | 500 | 300 | 100 |  12
   33 [ ] | 500 | 300 | 150 |  18
   34 [ ] | 500 | 300 | 200 |  25
   35 [ ] | 500 | 300 | 250 |  25
   36 [ ] | 500 | 300 | 300 |  25
   37 [ ] | 500 | 400 | 100 |  12
   38 [ ] | 500 | 400 | 200 |  25
   39 [ ] | 500 | 400 | 250 |  25
   40 [ ] | 500 | 500 | 100 |  12
   41 [ ] | 500 | 500 | 150 |  18
   42 [ ] | 500 | 500 | 200 |  25
   43 [ ] | 500 | 500 | 250 |  25
   44 [ ] | 500 | 500 | 300 |  25
   45 [ ] | 550 | 200 | 100 |  12
   46 [ ] | 550 | 200 | 150 |  18
   47 [ ] | 550 | 200 | 200 |  25
   48 [ ] | 550 | 300 | 100 |  12
   49 [ ] | 550 | 300 | 150 |  18
   50 [ ] | 550 | 300 | 200 |  25
   51 [ ] | 550 | 300 | 275 |  27
   52 [ ] | 550 | 300 | 300 |  25
   53 [ ] | 550 | 375 | 250 |  25
   54 [ ] | 550 | 400 | 200 |  25
   55 [ ] | 560 | 450 | 225 |  28
   56 [ ] | 600 | 200 | 100 |  12
   57 [ ] | 600 | 200 | 150 |  18
   58 [ ] | 600 | 200 | 200 |  25
   59 [ ] | 600 | 300 | 100 |  12
   60 [ ] | 600 | 300 | 150 |  18
   61 [ ] | 600 | 300 | 200 |  25
   62 [ ] | 600 | 300 | 250 |  25
   63 [ ] | 600 | 300 | 300 |  25
   64 [ ] | 600 | 400 | 100 |  12
   65 [ ] | 600 | 400 | 150 |  18
   66 [ ] | 600 | 400 | 200 |  25
   67 [ ] | 600 | 400 | 300 |  25
   68 [ ] | 600 | 450 | 100 |  12
   69 [ ] | 600 | 450 | 150 |  18
   70 [ ] | 600 | 450 | 200 |  25
   71 [ ] | 600 | 450 | 225 |  28
   72 [ ] | 600 | 450 | 300 |  25
   73 [ ] | 600 | 500 | 100 |  12
   74 [ ] | 600 | 500 | 150 |  18
   75 [ ] | 600 | 500 | 200 |  25
   76 [ ] | 600 | 500 | 250 |  25
   77 [ ] | 600 | 500 | 300 |  25
   78 [ ] | 600 | 550 | 100 |  12
   79 [ ] | 600 | 550 | 150 |  18
   80 [ ] | 600 | 550 | 200 |  25
   81 [ ] | 600 | 550 | 275 |  27
   82 [ ] | 600 | 550 | 300 |  25
   83 [ ] | 600 | 600 | 100 |  12
   84 [ ] | 600 | 600 | 150 |  18
   85 [ ] | 600 | 600 | 200 |  25
   86 [ ] | 600 | 600 | 250 |  25
   87 [ ] | 600 | 600 | 300 |  25
   88 [ ] | 620 | 200 | 100 |  12
   89 [ ] | 620 | 200 | 150 |  18
   90 [ ] | 620 | 200 | 200 |  25
   91 [ ] | 620 | 300 | 100 |  12
   92 [ ] | 620 | 300 | 150 |  18
   93 [ ] | 620 | 300 | 200 |  25
   94 [ ] | 620 | 300 | 300 |  25
   95 [ ] | 620 | 400 | 100 |  12
   96 [ ] | 620 | 400 | 155 |  19
   97 [ ] | 620 | 400 | 200 |  25
   98 [ ] | 620 | 400 | 310 |  25
   99 [ ] | 620 | 500 | 100 |  12
  100 [ ] | 620 | 500 | 155 |  19
  101 [ ] | 620 | 500 | 166 |  20
  102 [ ] | 620 | 500 | 206 |  25
  103 [ ] | 620 | 500 | 250 |  25
  104 [ ] | 620 | 500 | 310 |  25
  105 [ ] | 650 | 400 | 200 |  25
  106 [ ] | 650 | 420 | 210 |  26
  107 [ ] | 650 | 450 | 225 |  28

[*] profile currently stored in FLASH

** Notice:
   configuration is stored in FLASH at: 0x9F01FFE0
   magic value is: 0x504C4C73, block size is: 24 B

** Notice:
   you should always make a backup of your devices
   entire FLASH content, before making any changes

uboot>

Just to let you know that the project is not dead: https://github.com/pepe2k/u-boot_mod/commits/master

Nice to see that tl-wr841n v9 is finnally supported! One question: did you test the image with that router, since I don't want it to get bricked, also, does it work with the OFW firmware too?

user5077 wrote:

Nice to see that tl-wr841n v9 is finnally supported! One question: did you test the image with that router, since I don't want it to get bricked, also, does it work with the OFW firmware too?

Yes, I tested the image on real hardware, OFW firmware is not working (old bug, still not solved).

Sorry, but how do you exactly compile the code? I keep getting this:

~/u-boot_mod-master $ make tplink_wr841n_v9
fatal: Not a git repository (or any parent up to mount point /home/...)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
make[1]: mips-openwrt-linux-uclibc-gcc: Command not found
Makefile:154: warning: overriding commands for target `.PHONY'
Makefile:152: warning: ignoring old commands for target `.PHONY'
Makefile:240: warning: overriding commands for target `board/ar7240/ap143/libap143.a'
Makefile:208: warning: ignoring old commands for target `board/ar7240/ap143/libap143.a'
Makefile:240: warning: overriding commands for target `cpu/mips/libmips.a'
Makefile:208: warning: ignoring old commands for target `cpu/mips/libmips.a'
Makefile:240: warning: overriding commands for target `cpu/mips/ar7240/libar7240.a'
Makefile:208: warning: ignoring old commands for target `cpu/mips/ar7240/libar7240.a'
> Configuring for TP-Link TL-WR841N/D v9 at: Tue Mar 22 18:35:31 EET 2016 
fatal: Not a git repository (or any parent up to mount point /home/...)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
make[1]: mips-openwrt-linux-uclibc-gcc: Command not found
Makefile:154: warning: overriding commands for target `.PHONY'
Makefile:152: warning: ignoring old commands for target `.PHONY'
Makefile:240: warning: overriding commands for target `board/ar7240/ap143/libap143.a'
Makefile:208: warning: ignoring old commands for target `board/ar7240/ap143/libap143.a'
Makefile:240: warning: overriding commands for target `cpu/mips/libmips.a'
Makefile:208: warning: ignoring old commands for target `cpu/mips/libmips.a'
Makefile:240: warning: overriding commands for target `cpu/mips/ar7240/libar7240.a'
Makefile:208: warning: ignoring old commands for target `cpu/mips/ar7240/libar7240.a'
make[2]: mips-openwrt-linux-uclibc-gcc: Command not found
fatal: Not a git repository (or any parent up to mount point /home/...)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
make[2]: mips-openwrt-linux-uclibc-gcc: Command not found
make[1]: mips-openwrt-linux-uclibc-gcc: Command not found
make[1]: *** [cpu/mips/start.o] Error 127
make: *** [tplink_wr841n_v9] Error 2

I know it will eventually be in a new release, but could you compile it for me for tl-wr841nv9?

(Last edited by user5077 on 22 Mar 2016, 17:42)

user5077 wrote:

Sorry, but how do you exactly compile the code? I keep getting this:

~/u-boot_mod-master $ make tplink_wr841n_v9
[...]
make[1]: mips-openwrt-linux-uclibc-gcc: Command not found
[...]

You need a toolchain.

pepe2k wrote:
user5077 wrote:

Sorry, but how do you exactly compile the code? I keep getting this:

~/u-boot_mod-master $ make tplink_wr841n_v9
[...]
make[1]: mips-openwrt-linux-uclibc-gcc: Command not found
[...]

You need a toolchain.

I already tried the Openwrt toolchain, but I'm not exactly sure how to do it. I tried putting the toolchain in the u-boot master folder, and a few other things, but I just get that.

(Last edited by user5077 on 22 Mar 2016, 17:45)

pepe2k have you considered moving your changes to a more recent version of U-Boot as the 1.1.4 version is very ancient.  Version 1.3.4 was released in August 2008 and then they changed the versioning to vYYYY.MM format.

rayknight wrote:

pepe2k have you considered moving your changes to a more recent version of U-Boot as the 1.1.4 version is very ancient.  Version 1.3.4 was released in August 2008 and then they changed the versioning to vYYYY.MM format.

This question is like a boomerang... And the answer is: yes, but newer U-Boot version images need more space and that simply means no more support for many devices which have <= 128 KB available space for bootloader (95% of the low/middle level router market). One of the most important ideas of this project is to support existing devices and give their users more functionality without changing things like partition sizes and organizations on the FLASH.

Anyway, someone already took care of that (just forgot that copy&paste method requires proper copyright handling): https://patchwork.ozlabs.org/project/ub … chive=both. If you search deeper, there were also other (unsuccessful) tries to add support for QC/A WiSoCs in U-Boot. Now it should be easier as the U-Boot project started to look like kernel (and also growing in size like kernel...).

There is also another project: http://www.barebox.org, with some initial support for devices based on AR933x and as far as I know, some people are already working on support for MediaTek SoCs. And this one I like more smile

I managed to compile it(finnally), but is it normal for the file size to be 126 KB? Here's the image: https://drive.google.com/file/d/0B2CQR4 … sp=sharing

can someone verify if it's been correctly compiled..?

EDIT: Sorry, but I was confused because linux show for some reason it was 126 KB, but windows says it's the correct 123 KB size.

(Last edited by user5077 on 23 Mar 2016, 15:42)

user5077 wrote:

I managed to compile it(finnally), but is it normal for the file size to be 126 KB?

I see that time I spent on writing README for the project is just wasted...
https://github.com/pepe2k/u-boot_mod#us … programmer

user5077 wrote:

[...] can someone verify if it's been correctly compiled..?

Yes, it's working:

***************************************
*     U-Boot 1.1.4-77ad4d95-dirty     *
*        Mar 23 2016, 16:30:33        *
***************************************

(Last edited by pepe2k on 23 Mar 2016, 15:40)

Hi pepe2k,

Firstly thanks for updating u_boot.

I'm trying to compile u-boot for mr3020 however something wrong is happening, or I'm doing something wrong? Here's the output I get (I removed "--silent" on Makefile.)


Configuring for TP-Link TL-MR3020 at: Thu Mar 24 20:02:57 WET 2016.
Makefile:154: warning: overriding recipe for target '.PHONY'
Makefile:152: warning: ignoring old recipe for target '.PHONY'
Makefile:240: warning: overriding recipe for target 'board/ar7240/ap121/libap121.a'
Makefile:208: warning: ignoring old recipe for target 'board/ar7240/ap121/libap121.a'
Makefile:240: warning: overriding recipe for target 'cpu/mips/libmips.a'
Makefile:208: warning: ignoring old recipe for target 'cpu/mips/libmips.a'
Makefile:240: warning: overriding recipe for target 'cpu/mips/ar7240/libar7240.a'
Makefile:208: warning: ignoring old recipe for target 'cpu/mips/ar7240/libar7240.a'
ln -s ../common/environment.c environment.c
ln -s ../lib_generic/crc32.c crc32.c
make[2]: '.depend' is up to date.
make -C tools all
gcc -g -Wall -pedantic -idirafter ../include -DTEXT_BASE=0x80010000 -DUSE_HOSTCC -O2 -c mkimage.c
gcc -g -Wall -pedantic -idirafter ../include -DTEXT_BASE=0x80010000 -DUSE_HOSTCC -O2 -c crc32.c
gcc -Wall -pedantic -idirafter ../include -DTEXT_BASE=0x80010000 -DUSE_HOSTCC -O2  -o mkimage mkimage.o crc32.o
strip mkimage
gcc -g -Wall -pedantic -idirafter ../include -DTEXT_BASE=0x80010000 -DUSE_HOSTCC -O2 -c envcrc.c
gcc -g  -idirafter ../include -DTEXT_BASE=0x80010000 -DUSE_HOSTCC -c environment.c
gcc -Wall -pedantic -idirafter ../include -DTEXT_BASE=0x80010000 -DUSE_HOSTCC -O2 -o envcrc envcrc.o crc32.o environment.o
mips-openwrt-linux-musl-gcc -Wa,-gstabs -D__ASSEMBLY__  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -DCOMPRESSED_UBOOT=1 -c -o cpu/mips/start.o u-boot_mod/u-boot/cpu/mips/start.S
make -C `dirname lib_generic/libgeneric.a`
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -DCONFIG_LZMA=1 -c -o crc32.o crc32.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -DCONFIG_LZMA=1 -c -o ctype.o ctype.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -DCONFIG_LZMA=1 -c -o display_options.o display_options.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -DCONFIG_LZMA=1 -c -o ldiv.o ldiv.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -DCONFIG_LZMA=1 -c -o string.o string.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -DCONFIG_LZMA=1 -c -o vsprintf.o vsprintf.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -DCONFIG_LZMA=1 -c -o LzmaWrapper.o LzmaWrapper.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -DCONFIG_LZMA=1 -c -o LzmaDecode.o LzmaDecode.c
mips-openwrt-linux-musl-ar crv libgeneric.a crc32.o ctype.o display_options.o ldiv.o string.o vsprintf.o LzmaWrapper.o LzmaDecode.o
a - crc32.o
a - ctype.o
a - display_options.o
a - ldiv.o
a - string.o
a - vsprintf.o
a - LzmaWrapper.o
a - LzmaDecode.o
make -C `dirname common/libcommon.a`
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o main.o main.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o cmd_bootm.o cmd_bootm.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o cmd_boot.o cmd_boot.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o cmd_flash.o cmd_flash.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o cmd_mem.o cmd_mem.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o cmd_custom.o cmd_custom.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o cmd_net.o cmd_net.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o cmd_nvedit.o cmd_nvedit.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o cmd_itest.o cmd_itest.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o cmd_load.o cmd_load.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o cmd_qcaclk.o cmd_qcaclk.c
In file included from u-boot_mod/u-boot/include/cmd_qcaclk.h:13:0,
                 from cmd_qcaclk.c:13:
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1637:12: warning: inline function 'qca_dram_tras_lat' declared but never defined
 inline u32 qca_dram_tras_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1636:12: warning: inline function 'qca_dram_trp_lat' declared but never defined
 inline u32 qca_dram_trp_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1635:12: warning: inline function 'qca_dram_trcd_lat' declared but never defined
 inline u32 qca_dram_trcd_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1634:12: warning: inline function 'qca_dram_cas_lat' declared but never defined
 inline u32 qca_dram_cas_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1621:12: warning: inline function 'qca_xtal_is_40mhz' declared but never defined
 inline u32 qca_xtal_is_40mhz(void);
            ^
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o command.o command.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o console.o console.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o devices.o devices.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o dlmalloc.o dlmalloc.c
mips-openwrt-linux-musl-gcc -Wa,-gstabs -D__ASSEMBLY__  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -DCOMPRESSED_UBOOT=1 -Wa,--no-warn \
    -DENV_CRC=0 \
    -c -o environment.o environment.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o env_common.o env_common.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o env_nowhere.o env_nowhere.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o exports.o exports.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o flash.o flash.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o lists.o lists.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o env_flash.o env_flash.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o hush.o hush.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o xyzModem.o xyzModem.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o crc16.o crc16.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o s_record.o s_record.c
mips-openwrt-linux-musl-ar crv libcommon.a  main.o cmd_bootm.o cmd_boot.o cmd_flash.o cmd_mem.o cmd_custom.o cmd_net.o cmd_nvedit.o cmd_itest.o cmd_load.o cmd_qcaclk.o command.o console.o devices.o dlmalloc.o environment.o env_common.o env_nowhere.o exports.o flash.o lists.o env_flash.o hush.o xyzModem.o crc16.o s_record.o
a - main.o
a - cmd_bootm.o
a - cmd_boot.o
a - cmd_flash.o
a - cmd_mem.o
a - cmd_custom.o
a - cmd_net.o
a - cmd_nvedit.o
a - cmd_itest.o
a - cmd_load.o
a - cmd_qcaclk.o
a - command.o
a - console.o
a - devices.o
a - dlmalloc.o
a - environment.o
a - env_common.o
a - env_nowhere.o
a - exports.o
a - flash.o
a - lists.o
a - env_flash.o
a - hush.o
a - xyzModem.o
a - crc16.o
a - s_record.o
make -C `dirname board/ar7240/ap121/libap121.a`
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o ap121.o ap121.c
In file included from ap121.c:10:0:
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1637:12: warning: inline function 'qca_dram_tras_lat' declared but never defined
 inline u32 qca_dram_tras_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1636:12: warning: inline function 'qca_dram_trp_lat' declared but never defined
 inline u32 qca_dram_trp_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1635:12: warning: inline function 'qca_dram_trcd_lat' declared but never defined
 inline u32 qca_dram_trcd_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1634:12: warning: inline function 'qca_dram_cas_lat' declared but never defined
 inline u32 qca_dram_cas_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1621:12: warning: inline function 'qca_xtal_is_40mhz' declared but never defined
 inline u32 qca_xtal_is_40mhz(void);
            ^
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o ../common/spi_flash.o ../common/spi_flash.c
In file included from ../common/spi_flash.c:12:0:
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1637:12: warning: inline function 'qca_dram_tras_lat' declared but never defined
 inline u32 qca_dram_tras_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1636:12: warning: inline function 'qca_dram_trp_lat' declared but never defined
 inline u32 qca_dram_trp_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1635:12: warning: inline function 'qca_dram_trcd_lat' declared but never defined
 inline u32 qca_dram_trcd_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1634:12: warning: inline function 'qca_dram_cas_lat' declared but never defined
 inline u32 qca_dram_cas_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1621:12: warning: inline function 'qca_xtal_is_40mhz' declared but never defined
 inline u32 qca_xtal_is_40mhz(void);
            ^
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o ../common/ar7240_s26_phy.o ../common/ar7240_s26_phy.c
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o ../common/common.o ../common/common.c
In file included from ../common/common.c:17:0:
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1637:12: warning: inline function 'qca_dram_tras_lat' declared but never defined
 inline u32 qca_dram_tras_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1636:12: warning: inline function 'qca_dram_trp_lat' declared but never defined
 inline u32 qca_dram_trp_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1635:12: warning: inline function 'qca_dram_trcd_lat' declared but never defined
 inline u32 qca_dram_trcd_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1634:12: warning: inline function 'qca_dram_cas_lat' declared but never defined
 inline u32 qca_dram_cas_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1621:12: warning: inline function 'qca_xtal_is_40mhz' declared but never defined
 inline u32 qca_xtal_is_40mhz(void);
            ^
mips-openwrt-linux-musl-ar crv libap121.a ap121.o ../common/spi_flash.o ../common/ar7240_s26_phy.o ../common/common.o 
a - ap121.o
a - ../common/spi_flash.o
a - ../common/ar7240_s26_phy.o
a - ../common/common.o
make -C `dirname cpu/mips/libmips.a`
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o cpu.o cpu.c
mips-openwrt-linux-musl-gcc -Wa,-gstabs -D__ASSEMBLY__  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -DCOMPRESSED_UBOOT=1 -c -o cache.o u-boot_mod/u-boot/cpu/mips/cache.S
mips-openwrt-linux-musl-ar crv libmips.a cpu.o cache.o
a - cpu.o
a - cache.o
make -C `dirname cpu/mips/ar7240/libar7240.a`
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o qca_common.o qca_common.c
In file included from qca_common.c:12:0:
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1637:12: warning: inline function 'qca_dram_tras_lat' declared but never defined
 inline u32 qca_dram_tras_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1636:12: warning: inline function 'qca_dram_trp_lat' declared but never defined
 inline u32 qca_dram_trp_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1635:12: warning: inline function 'qca_dram_trcd_lat' declared but never defined
 inline u32 qca_dram_trcd_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1634:12: warning: inline function 'qca_dram_cas_lat' declared but never defined
 inline u32 qca_dram_cas_lat(void);
            ^
mips-openwrt-linux-musl-gcc  -O  -D__KERNEL__ -DTEXT_BASE=0x80010000 -Iu-boot_mod/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/diogo/Desktop/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.14/lib/gcc/mips-openwrt-linux-musl/5.3.0/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float -mips32 -march=mips32 -mtune=mips32 -EB -fno-schedule-insns -fno-schedule-insns2 -Wall -Wstrict-prototypes -DCOMPRESSED_UBOOT=1  -c -o qca_clocks.o qca_clocks.c
In file included from qca_clocks.c:16:0:
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1637:12: warning: inline function 'qca_dram_tras_lat' declared but never defined
 inline u32 qca_dram_tras_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1636:12: warning: inline function 'qca_dram_trp_lat' declared but never defined
 inline u32 qca_dram_trp_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1635:12: warning: inline function 'qca_dram_trcd_lat' declared but never defined
 inline u32 qca_dram_trcd_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1634:12: warning: inline function 'qca_dram_cas_lat' declared but never defined
 inline u32 qca_dram_cas_lat(void);
            ^
u-boot_mod/u-boot/include/soc/qca_soc_common.h:1621:12: warning: inline function 'qca_xtal_is_40mhz' declared but never defined
 inline u32 qca_xtal_is_40mhz(void);
            ^
{standard input}: Assembler messages:
{standard input}:1106: Error: operand 2 must be an immediate expression `lb $2,$4($2)'
{standard input}:1165: Error: operand 2 must be an immediate expression `lb $2,$4($2)'
{standard input}:1224: Error: operand 2 must be an immediate expression `lh $2,$4($2)'
{standard input}:1283: Error: operand 2 must be an immediate expression `lh $2,$4($2)'
{standard input}:1336: Error: operand 2 must be an immediate expression `lw $2,$4($2)'
{standard input}:1383: Error: operand 2 must be an immediate expression `lw $2,$4($2)'
{standard input}:1430: Error: operand 2 must be an immediate expression `sb $4,$5($2)'
{standard input}:1477: Error: operand 2 must be an immediate expression `sb $4,$5($2)'
{standard input}:1524: Error: operand 2 must be an immediate expression `sh $4,$5($2)'
{standard input}:1571: Error: operand 2 must be an immediate expression `sh $4,$5($2)'
{standard input}:1618: Error: operand 2 must be an immediate expression `sw $4,$5($2)'
{standard input}:1665: Error: operand 2 must be an immediate expression `sw $4,$5($2)'
{standard input}:1735: Error: operand 2 must be an immediate expression `lb $1,$4($2)'
{standard input}:1812: Error: operand 2 must be an immediate expression `lh $1,$4($2)'
{standard input}:1889: Error: operand 2 must be an immediate expression `lw $1,$4($2)'
{standard input}:1968: Error: operand 2 must be an immediate expression `sb $1,$4($2)'
{standard input}:2045: Error: operand 2 must be an immediate expression `sh $1,$4($2)'
{standard input}:2122: Error: operand 2 must be an immediate expression `sw $1,$4($2)'
u-boot_mod/u-boot/config.mk:248: recipe for target 'qca_clocks.o' failed
make[2]: *** [qca_clocks.o] Error 1
Makefile:240: recipe for target 'cpu/mips/ar7240/libar7240.a' failed
make[1]: *** [cpu/mips/ar7240/libar7240.a] Error 2
Makefile:26: recipe for target 'tplink_mr3020' failed
make: *** [tplink_mr3020] Error 2
doiga wrote:

Hi pepe2k,

Firstly thanks for updating u_boot.

I'm trying to compile u-boot for mr3020 however something wrong is happening, or I'm doing something wrong? Here's the output I get (I removed "--silent" on Makefile.)

Seems like problem related with new gcc and/or musl.
Last version I have build images successfully was: toolchain-mips_34kc_gcc-4.8-linaro_musl-1.1.11

I will take a look on this problem next week and probably just include working toolchain in repository.
For now you can revert to earlier version in trunk and rebuild toolchain or use toolchain from previous OpenWrt release.

Yes, I used toolchain from attitude adjustment, hence why I didn't have this issue. Here are the exact instructions for compiling I followed, in case anyone has issues: https://dev.wlan-si.net/ticket/1191

Also, I do not recommend flashing via serial, it's easy to make a mistake, and then you need a SPI programmer to recover. I haven't flashed yet because there were recent power failures those days and I dont have a SPI programmer, but I ordered one and it will arrive in a few days, and I will flash it soon.

@pepe2k - I wonder, is it possible to get the boot log via netconsole?

(Last edited by user5077 on 25 Mar 2016, 11:57)

That may be the problem since I'm using gcc 5.3.0 and musl 1.1.14, the one on the u-boot wiki. I will try with the toolchain you said.

pepe2k wrote:
doiga wrote:

Hi pepe2k,

Firstly thanks for updating u_boot.

I'm trying to compile u-boot for mr3020 however something wrong is happening, or I'm doing something wrong? Here's the output I get (I removed "--silent" on Makefile.)

Seems like problem related with new gcc and/or musl.
Last version I have build images successfully was: toolchain-mips_34kc_gcc-4.8-linaro_musl-1.1.11

I will take a look on this problem next week and probably just include working toolchain in repository.
For now you can revert to earlier version in trunk and rebuild toolchain or use toolchain from previous OpenWrt release.

Just flashed this to my tl-wr841n v9 and it worked. I used a custom openwrt image with unlocked u-boot. But after reboot U-Boot was loading, but it didn't want to boot openwrt automatically. Oddly, I ran boot from netconsole and it worked. Why? EDIT: Even after reflash from web recovery mode it doesn't boot automatically

here's the netconsole log:

?          - alias for 'help'
boot       - boot default, i.e., run 'bootcmd'
bootd      - boot default, i.e., run 'bootcmd'
bootm      - boot application image from memory
clearclk   - remove PLL and clocks configuration from FLASH
cp         - memory copy
defenv     - reset environment variables to their default values
dhcp       - invoke DHCP client to obtain IP/boot params
echo       - echo args to console
erase      - erase FLASH memory
exit       - exit script
go         - start application at address 'addr'
help       - print embedded help
httpd      - start www server for firmware recovery
itest      - return true/false on integer compare
loadb      - load binary file over serial (Kermit mode)
loady      - load binary file over serial (Ymodem mode)
md         - memory display
mm         - memory modify (auto-incrementing)
mtest      - RAM test
mw         - memory write (fill)
nm         - memory modify (constant address)
ping       - send ICMP ECHO_REQUEST to network host
printenv   - print environment variables
printmac   - print MAC address stored in FLASH
printmodel - print router model stored in FLASH
printpin   - print WPS pin stored in FLASH
reset      - perform RESET of the CPU
run        - run commands in an environment variable
saveenv    - save environment variables to FLASH
setclk     - select clocks configuration from predefined list
setenv     - set environment variables
setmac     - save new MAC address in FLASH
sntp       - send NTP request to NTP server
startnc    - start net console
startsc    - start serial console
test       - minimal test like /bin/sh
tftpboot   - boot image via network using TFTP protocol
version    - print U-Boot version

uboot> printenv
bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:128k(u-boot),1024k(kernel),2816k(rootfs),64k(config),64k(art)
bootcmd=bootm 0x9F020000
bootdelay=1
baudrate=115200
ipaddr=192.168.1.1
serverip=192.168.1.2
bootfile="firmware.bin"
loadaddr=0x80800000
ncport=6666
uboot_addr=0x9F000000
uboot_name=uboot.bin
uboot_size=0x1EC00
uboot_backup_size=0x20000
uboot_upg=if ping $serverip; then mw.b $loadaddr 0xFF $uboot_backup_size && cp.b $uboot_addr $loadaddr $uboot_backup_size && tftp $loadaddr $uboot_name && if itest.l $filesize <= $uboot_size; then erase $uboot_addr +$uboot_backup_size && cp.b $loadaddr $uboot_addr $uboot_backup_size && echo OK!; else echo ERROR! Wrong file size!; fi; else echo ERROR! Server not reachable!; fi
stdin=nc
stdout=nc
stderr=nc
ethact=eth1

Environment size: 814/4092 bytes

uboot> boot
Booting image at: 0x9F020000

   Image name:   OpenWrt r46767
   Image type:   MIPS Linux Kernel Image (lzma compressed)
   Data size:    1098588 Bytes = 1 MB
   Load address: 0x80060000
   Entry point:  0x80060000

Is it possible to make some kind of script to make it automatically boot?

(Last edited by user5077 on 25 Mar 2016, 13:28)

Sorry, posts 501 to 500 are missing from our archive.