Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Commit

Permalink
Remaining bits of basic TL-WR1043ND support.
Browse files Browse the repository at this point in the history
Big warning:
The original bootloader only supports gzip compression, while
u-boot_mod only supports lzma.

To flash one of the OpenWRT images, you have to remove the g-zip
decompressor stub (or recompress it with lzma) at offset 0x200 in the
image file.

Boot log:

*********************************************
*   U-Boot 1.1.4  (Oct 20 2015, 01:13:35)   *
*********************************************

AP83 (AR9132) U-Boot for TL-WR1043ND

DRAM:
sri
32 MB
FLASH:  Winbond W25Q128 (16 MB)
CLOCKS: 400/400/200/25 MHz (CPU/RAM/AHB/SPI)

** Warning: using fixed MAC address!

LED on during eth initialization...

ag7100_enet_initialize...
No valid address in Flash. Using fixed address
: cfg1 0xf cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
eth0 up
Hit any key to stop autoboot: 1 ��0

Booting image at: 0xBF020000

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

Uncompressing kernel image... OK!
Starting kernel...

OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Looking for OpenWrt image... found at 0xbf022000
Decompressing kernel... done!
Starting kernel at 80060000...

[    0.000000] Linux version 3.18.20 (buildbot@builder1) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r46450) ) #1 Fri Sep 4 21:55:57 CEST 2015
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9132 rev 2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x01ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=TL-WR1043ND console=ttyS0,115200 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 28516K/32768K available (2621K kernel code, 129K rwdata, 344K rodata, 224K init, 194K bss, 4252K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:5.000MHz
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.100000] NET: Registered protocol family 16
[    0.100000] MIPS: machine is TP-LINK TL-WR1043ND
[    0.390000] Switched to clocksource MIPS
[    0.390000] NET: Registered protocol family 2
[    0.400000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.400000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.410000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.420000] TCP: reno registered
[    0.420000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.420000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.430000] NET: Registered protocol family 1
[    0.440000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.460000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.470000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.480000] msgmni has been set to 55
[    0.480000] io scheduler noop registered
[    0.490000] io scheduler deadline registered (default)
[    0.490000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.500000] console [ttyS0] disabled
[    0.530000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 12500000) is a 16550A
[    0.540000] console [ttyS0] enabled
[    0.540000] console [ttyS0] enabled
[    0.540000] bootconsole [early0] disabled
[    0.540000] bootconsole [early0] disabled
[    0.550000] m25p80 spi0.0: found w25q128, expected m25p80
[    0.560000] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.560000] 5 tp-link partitions found on MTD device spi0.0
[    0.570000] Creating 5 MTD partitions on "spi0.0":
[    0.570000] 0x000000000000-0x000000020000 : "u-boot"
[    0.580000] 0x000000020000-0x00000012e400 : "kernel"
[    0.590000] 0x00000012e400-0x000000ff0000 : "rootfs"
[    0.590000] mtd: device 2 (rootfs) set to be root filesystem
[    0.600000] 1 squashfs-split partitions found on MTD device rootfs
[    0.600000] 0x000000360000-0x000000ff0000 : "rootfs_data"
[    0.610000] 0x000000ff0000-0x000001000000 : "art"
[    0.620000] 0x000000020000-0x000000ff0000 : "firmware"
[    0.620000] Realtek RTL8366RB ethernet switch driver version 0.2.4
[    0.740000] rtl8366rb rtl8366rb: using GPIO pins 18 (SDA) and 19 (SCK)
[    0.740000] rtl8366rb rtl8366rb: RTL5937 ver. 3 chip found
[    0.930000] libphy: rtl8366rb: probed
[    1.250000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    1.250000] TCP: cubic registered
[    1.260000] NET: Registered protocol family 17
[    1.260000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.280000] Bridge firewalling registered
[    1.280000] 8021q: 802.1Q VLAN Support v1.8
[    1.290000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    1.300000] Freeing unused kernel memory: 224K (80368000 - 803a0000)
[    2.580000] init: Console is alive
[    2.580000] init: - watchdog -
[    4.160000] usbcore: registered new interface driver usbfs
[    4.170000] usbcore: registered new interface driver hub
[    4.170000] usbcore: registered new device driver usb
[    4.180000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.190000] ehci-platform: EHCI generic platform driver
[    4.200000] ehci-platform ehci-platform: EHCI Host Controller
[    4.200000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    4.210000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    4.240000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    4.240000] hub 1-0:1.0: USB hub found
[    4.250000] hub 1-0:1.0: 1 port detected
[    4.660000] init: - preinit -
[    5.410000] eth0: link up (1000Mbps/Full duplex)
[    5.440000] random: procd urandom read with 8 bits of entropy available
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    8.740000] jffs2: notice: (352) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    8.760000] mount_root: switching to jffs2 overlay
[    8.800000] eth0: link down
[    8.820000] procd: - early -
[    8.820000] procd: - watchdog -
[    9.620000] procd: - ubus -
[   10.630000] procd: - init -
Please press Enter to activate this console.
[   11.560000] NET: Registered protocol family 10
[   11.570000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.590000] Loading modules backported from Linux version master-2015-03-09-0-g141f155
[   11.590000] Backport generated by backports.git backports-20150129-0-gdd4a670
[   11.610000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.620000] nf_conntrack version 0.5.0 (449 buckets, 1796 max)
[   11.670000] xt_time: kernel timezone is -0000
[   11.700000] cfg80211: Calling CRDA to update world regulatory domain
[   11.700000] cfg80211: World regulatory domain updated:
[   11.710000] cfg80211:  DFS Master region: unset
[   11.710000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   11.720000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   11.730000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   11.740000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   11.750000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   11.750000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   11.760000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   11.770000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   11.780000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   11.870000] PPP generic driver version 2.4.2
[   11.880000] NET: Registered protocol family 24
[   11.980000] ieee80211 phy0: Atheros AR9100 MAC/BB Rev:7 AR2133 RF Rev:a2 mem=0xb80c0000, irq=2
[   11.990000] cfg80211: Calling CRDA for country: DE
[   11.990000] cfg80211: Regulatory domain changed to country: DE
[   12.000000] cfg80211:  DFS Master region: ETSI
[   12.000000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   12.010000] cfg80211:   (2400000 KHz - 2483000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   12.020000] cfg80211:   (5150000 KHz - 5250000 KHz @ 80000 KHz, 200000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[   12.030000] cfg80211:   (5250000 KHz - 5350000 KHz @ 80000 KHz, 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   12.040000] cfg80211:   (5470000 KHz - 5725000 KHz @ 160000 KHz), (N/A, 2700 mBm), (0 s)
[   12.050000] cfg80211:   (57000000 KHz - 66000000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
[   22.310000] eth0: link up (1000Mbps/Full duplex)
[   22.320000] device eth0.1 entered promiscuous mode
[   22.320000] device eth0 entered promiscuous mode
[   22.340000] br-lan: port 1(eth0.1) entered forwarding state
[   22.340000] br-lan: port 1(eth0.1) entered forwarding state
[   24.340000] br-lan: port 1(eth0.1) entered forwarding state
[   32.250000] random: nonblocking pool is initialized

BusyBox v1.23.2 (2015-07-25 15:09:46 CEST) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (15.05, r46767)
 -----------------------------------------------------
  * 1 1/2 oz Gin            Shake with a glassful
  * 1/4 oz Triple Sec       of broken ice and pour
  * 3/4 oz Lime Juice       unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -----------------------------------------------------
root@OpenWrt:/#
  • Loading branch information
ranma committed Oct 19, 2015
1 parent 9449d35 commit aee52d2
Show file tree
Hide file tree
Showing 6 changed files with 342 additions and 42 deletions.
66 changes: 45 additions & 21 deletions u-boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -321,40 +321,64 @@ hornet_common_config : common_config
@echo "#define CONFIG_MACH_HORNET 1" >> include/config.h
@echo "#define CONFIG_HORNET_1_1_WAR 1" >> include/config.h

tb225_config : unconfig
@ >include/config.h
ar7100_common_config: common_config
@echo "#define CONFIG_AR7100 1" >>include/config.h
@./mkconfig -a tb225 mips mips tb225 ar7100 ar7100

pb42_config : unconfig
@ >include/config.h
ar9100_common_config: common_config
@echo "#define CONFIG_AR7100 1" >>include/config.h
@echo "#define CONFIG_AR9100 1" >>include/config.h

tb225_config: unconfig ar7100_common_config
@echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
@echo "#define BOARD_CUSTOM_STRING \"TB225 (AR7100) U-Boot\"" >> include/config.h
@./mkconfig -a tb225 mips mips tb225 ar7100 ar7100

pb42_config: unconfig ar7100_common_config
@echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
@echo "#define BOARD_CUSTOM_STRING \"PB42 (AR7100) U-Boot\"" >> include/config.h
@./mkconfig -a pb42 mips mips pb42 ar7100 ar7100

tb243_config : unconfig
@ >include/config.h
@echo "#define CONFIG_AR7100 1" >>include/config.h
@echo "#define CONFIG_AR9100 1" >>include/config.h
tb243_config: unconfig ar9100_common_config
@echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
@echo "#define BOARD_CUSTOM_STRING \"TB243 (AR9100) U-Boot\"" >> include/config.h
@./mkconfig -a tb243 mips mips tb243 ar7100 ar7100

ap83_config : unconfig
@ >include/config.h
@echo "#define CONFIG_AR7100 1" >>include/config.h
@echo "#define CONFIG_AR9100 1" >>include/config.h
ap83_config: unconfig ar9100_common_config
@echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
@echo "#define BOARD_CUSTOM_STRING \"AP83 (AR9100) U-Boot\"" >> include/config.h
@./mkconfig -a ap83 mips mips ap83 ar7100 ar7100

ap81_config : unconfig
@ >include/config.h
@echo "#define CONFIG_AR7100 1" >>include/config.h
@echo "#define CONFIG_AR9100 1" >>include/config.h
ap81_config: unconfig ar9100_common_config
@echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
@echo "#define BOARD_CUSTOM_STRING \"AP81 (AR9100) U-Boot\"" >> include/config.h
@./mkconfig -a ap81 mips mips ap81 ar7100 ar7100

cus97_config : unconfig
@ >include/config.h
@echo "#define CONFIG_AR7100 1" >>include/config.h
@echo "#define CONFIG_AR9100 1" >>include/config.h
cus97_config: unconfig ar9100_common_config
@echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
@echo "#define BOARD_CUSTOM_STRING \"CUS97 (AR9100) U-Boot\"" >> include/config.h
@./mkconfig -a cus97 mips mips cus97 ar7100 ar7100

wr1043nd_config : unconfig ar9100_common_config
@/bin/echo -e '\e[32m> Configuring for TP-Link TL-WR1043ND at:' `date` '\e[0m'
@echo "#define CONFIG_FOR_TPLINK_WR1043ND 1" >> include/config.h
# Compressed doesn't compile yet.
@echo "#undef COMPRESSED_UBOOT" >> include/config.h
@echo "#define GPIO_SYS_LED_BIT 2" >> include/config.h
@echo "#define GPIO_SYS_LED_ON 0" >> include/config.h
@echo "#define GPIO_WLAN_LED_BIT 9" >> include/config.h
@echo "#define GPIO_WLAN_LED_ON 0" >> include/config.h
@echo "#define GPIO_USB_LED_BIT 1" >> include/config.h
@echo "#define GPIO_USB_LED_ON 0" >> include/config.h
@echo "#define GPIO_QSS_LED_BIT 5" >> include/config.h
@echo "#define GPIO_QSS_LED_ON 1" >> include/config.h
# we will use QSS button instead of reset
@echo "#define GPIO_RST_BUTTON_BIT 7" >> include/config.h
@echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW 1" >> include/config.h
@echo "#define DEFAULT_FLASH_SIZE_IN_MB 8" >> include/config.h
@echo "#define BOARD_CUSTOM_STRING \"AP83 (AR9132) U-Boot for TL-WR1043ND\"" >> include/config.h

@./mkconfig -a ap83 mips mips ap83 ar7100 ar7100

wr703n_config : unconfig hornet_common_config
@/bin/echo -e '\e[32m> Configuring for TP-Link TL-WR703N at:' `date` '\e[0m'
@echo "#define CONFIG_FOR_TPLINK_WR703N_V1 1" >> include/config.h
Expand Down
107 changes: 102 additions & 5 deletions u-boot/board/ar7100/ap83/ap83.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,90 @@
#include <version.h>
#include "ar7100_soc.h"

static unsigned int all_led_mask(void)
{
unsigned int mask = 0;
#ifdef GPIO_SYS_LED_BIT
mask |= 1 << GPIO_SYS_LED_BIT;
#endif
#ifdef GPIO_USB_LED_BIT
mask |= 1 << GPIO_USB_LED_BIT;
#endif
#ifdef GPIO_WLAN_LED_BIT
mask |= 1 << GPIO_WLAN_LED_BIT;
#endif
#ifdef GPIO_QSS_LED_BIT
mask |= 1 << GPIO_QSS_LED_BIT;
#endif
return mask;
}

static unsigned int all_led_value(int on)
{
unsigned int value = 0;
#ifdef GPIO_SYS_LED_BIT
value |= GPIO_SYS_LED_ON << GPIO_SYS_LED_BIT;
#endif
#ifdef GPIO_USB_LED_BIT
value |= GPIO_USB_LED_ON << GPIO_USB_LED_BIT;
#endif
#ifdef GPIO_WLAN_LED_BIT
value |= GPIO_WLAN_LED_ON << GPIO_WLAN_LED_BIT;
#endif
#ifdef GPIO_QSS_LED_BIT
value |= GPIO_QSS_LED_ON << GPIO_QSS_LED_BIT;
#endif
if (!on) {
value ^= all_led_mask();
}
return value;
}

void led_toggle(void){
unsigned int gpio;

gpio = ar7100_reg_rd(AR7100_GPIO_OUT);
gpio ^= all_led_mask();
ar7100_reg_wr(AR7100_GPIO_OUT, gpio);
}

void all_led_on(void){
unsigned int gpio;

gpio = ar7100_reg_rd(AR7100_GPIO_OUT);
gpio &= ~all_led_mask();
gpio |= all_led_value(1);
ar7100_reg_wr(AR7100_GPIO_OUT, gpio);
}

void all_led_off(void){
unsigned int gpio;

gpio = ar7100_reg_rd(AR7100_GPIO_OUT);
gpio &= ~all_led_mask();
gpio |= all_led_value(0);
ar7100_reg_wr(AR7100_GPIO_OUT, gpio);
}

void gpio_config(void) {
ar7100_reg_wr(AR7100_GPIO_OE, (ar7100_reg_rd(AR7100_GPIO_OE) | all_led_mask()));
all_led_off();
}

#ifndef GPIO_RST_BUTTON_BIT
#error "GPIO_RST_BUTTON_BIT not defined!"
#endif
int reset_button_status(void){
unsigned int gpio;

gpio = ar7100_reg_rd(AR7100_GPIO_IN);

#if defined(GPIO_RST_BUTTON_IS_ACTIVE_LOW)
return !(gpio & (1 << GPIO_RST_BUTTON_BIT));
#else
return !!(gpio & (1 << GPIO_RST_BUTTON_BIT));
#endif
}

void
ar7100_usb_initial_config(void)
Expand Down Expand Up @@ -133,14 +217,27 @@ ar7100_mem_config()
return (ar7100_ddr_find_size());
}

long int initdram(int board_type)
long int initdram(void)
{
gpio_config();
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
return (ar7100_mem_config());
#else
return (ar7100_ddr_find_size());
#endif
}

int checkboard (void)
{
#ifndef COMPRESSED_UBOOT
int checkboard (void) {
printf(BOARD_CUSTOM_STRING"\n\n");
return 0;
}
#endif

printf("AP83 (ar9100) U-boot " ATH_AP83_UBOOT_VERSION "\n");
return 0;
/*
* Returns a string with memory type preceded by a space sign
*/
const char* print_mem_type(void){
/* TODO */
return "";
}
16 changes: 12 additions & 4 deletions u-boot/board/ar7100/ap83/config.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# ROM version
TEXT_BASE = 0xbf000000

# SDRAM version
#TEXT_BASE = 0xa1000000
ifdef COMPRESSED_UBOOT
TEXT_BASE = 0x80010000
BOOTSTRAP_TEXT_BASE = 0xBF000000
# RAM version
else
ifdef CONFIG_SKIP_LOWLEVEL_INIT
TEXT_BASE = 0x80100000
else
# Uncompressed ROM version
TEXT_BASE = 0xBF000000
endif
endif
62 changes: 62 additions & 0 deletions u-boot/board/ar7100/ap83/u-boot-bootstrap.lds
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* (C) Copyright 2003
* Wolfgang Denk Engineering, <wd@denx.de>
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/

OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")
OUTPUT_ARCH(mips)
ENTRY(_start_bootstrap)
SECTIONS
{
. = 0x00000000;

. = ALIGN(4);
.text :
{
*(.text*)
}

. = ALIGN(4);
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }

. = ALIGN(4);
.data : { *(.data*) }

. = .;
_gp = ALIGN(16);

.got : {
__got_start_bootstrap = .;
*(.got)
__got_end_bootstrap = .;
}

. = ALIGN(4);
.sdata : { *(.sdata*) }

uboot_end_data_bootstrap = .;
num_got_entries = (__got_end_bootstrap - __got_start_bootstrap) >> 2;

. = ALIGN(4);
.sbss : { *(.sbss*) }
.bss : { *(.bss*) . = ALIGN(4); }
uboot_end_bootstrap = .;
}
4 changes: 4 additions & 0 deletions u-boot/cpu/mips/ar7100/meminit.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
#include <asm/addrspace.h>
#include "ar7100_soc.h"

#ifdef COMPRESSED_UBOOT
#define printf(x, ...)
#endif


uint8_t tap_settings[] =
{0x40, 0x41, 0x10, 0x12, 0x13, 0x15, 0x1a, 0x1c, 0x1f, 0x2f, 0x3f};
Expand Down
Loading

0 comments on commit aee52d2

Please sign in to comment.