OpenWrt Forum Archive

Topic: Problem Working with Ap121 board...

The content of this topic has been archived between 22 Apr 2018 and 28 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

That I don't know, you should look through the code smile

In terms of RKuImage this is procedure called -> it will create a sysupgrade file with rootfs first, than a kernel. This is defined in makefile as well.

(Last edited by jaceq on 19 Apr 2013, 10:34)

I tried to go through the code. Its a bit confusing at time. I am compiling for ap121 but i can see files for other tplink router also getting compiled... This is confusing me more... Anyways will dig the code soon. Also the compilation is going on. As soon as i am done with it will message you

Hey Jaceq,

I am not able to change the partition table to suit mine. I have search a lot for it. Do you have any idea where ap121's partition table is located.  The partition i  see is as follows

[    0.690000] Creating 7 MTD partitions on "spi0.0":                           
[    0.700000] 0x000000000000-0x000000040000 : "u-boot"                         
[    0.710000] 0x000000040000-0x000000050000 : "u-boot-env"                     
[    0.710000] 0x000000050000-0x000000300000 : "rootfs"                         
[    0.720000] mtd: partition "rootfs" set to be root filesystem               
[    0.720000] mtd: partition "rootfs_data" created automatically, ofs=1C0000, 
[    0.730000] 0x0000001c0000-0x000000300000 : "rootfs_data"                   
[    0.740000] 0x000000300000-0x0000003e0000 : "kernel"                         
[    0.740000] 0x0000003e0000-0x0000003f0000 : "nvram"                         
[    0.750000] 0x0000003f0000-0x000000400000 : "art"                           

I need to change it. How can i change it. I have done the modification as above but In vain

If partition layout from your boot log doesn't match what you defined in makefile this means something is wrong.
Either you took wrong kernel, something is mis-configured or you didn't clean built packages.
It's hard to say remotely.

I have a problem with starting WLAN on AP121, when I add the kmod-ath9k, AP121 stops responding at startup. The problem does not occur on the original linux came with the AP121.

Ok featon. to get the WLAN on, You need to make some changes inside your board

1. open file  /etc/config/wirless : vi /etc/config/wirless
2. Just beside disabled, value will be 1 change it to 0
3. then save the file
4. type command wifi on your console.

Enjoy... Any problem you can let me know.

nikhillife11 how to change the file as AP121 stops responding, or how can I attach the file to create an image?

Faeton, Do you have a console. Can You share some console log if possible...

Starting kernel ...

[    0.000000] Linux version 3.7.9 (#####) (gcc version 4.6.4 20121210 (prerelease) (Linaro GCC 4.6-2012.12) ) #57 Fri Apr 26 10:36:14 CEST 2013
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9330 rev 1
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 01000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x00ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x00ffffff]
[    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 off.  Total pages: 4064
[    0.000000] Kernel command line:  board=AP121 console=ttyATH0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2752k(rootfs),896k(kernel),64k(nvram),64k(art)ro,3648k@0x50000(firmware) rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 64 (order: -4, 256 bytes)
[    0.000000] Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] __ex_table already sorted, skipping sort
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 12868k/16384k available (2113k kernel code, 3516k reserved, 407k data, 228k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    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: 512
[    0.090000] NET: Registered protocol family 16
[    0.090000] MIPS: machine is Atheros AP121 reference board
[    0.550000] bio: create slab <bio-0> at 0
[    0.550000] Switching to clocksource MIPS
[    0.560000] NET: Registered protocol family 2
[    0.560000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.570000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.580000] TCP: Hash tables configured (established 512 bind 512)
[    0.580000] TCP: reno registered
[    0.580000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.590000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.600000] NET: Registered protocol family 1
[    0.620000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.620000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.640000] msgmni has been set to 25
[    0.640000] io scheduler noop registered
[    0.640000] io scheduler deadline registered (default)
[    0.650000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.660000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11) is a AR933X UART
[    0.660000] console [ttyATH0] enabled, bootconsole disabled
[    0.660000] console [ttyATH0] enabled, bootconsole disabled
[    0.670000] ath79-spi ath79-spi: master is unqueued, this is deprecated
[    0.680000] m25p80 spi0.0: found mx25l3205d, expected m25p80
[    0.690000] m25p80 spi0.0: mx25l3205d (4096 Kbytes)
[    0.690000] 7 cmdlinepart partitions found on MTD device spi0.0
[    0.700000] Creating 7 MTD partitions on "spi0.0":
[    0.700000] 0x000000000000-0x000000040000 : "u-boot"
[    0.710000] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.710000] 0x000000050000-0x000000300000 : "rootfs"
[    0.720000] mtd: partition "rootfs" set to be root filesystem
[    0.720000] mtd: partition "rootfs_data" created automatically, ofs=200000, len=100000
[    0.730000] 0x000000200000-0x000000300000 : "rootfs_data"
[    0.740000] 0x000000300000-0x0000003e0000 : "kernel"
[    0.740000] 0x0000003e0000-0x0000003f0000 : "nvram"
[    0.750000] 0x0000003f0000-0x000000400000 : "art"
[    0.760000] 0x000000050000-0x0000003e0000 : "firmware"
[    0.780000] libphy: ag71xx_mdio: probed
[    0.780000] eth0: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    1.330000] eth0: Found an AR7240/AR9330 built-in switch
[    2.370000] eth1: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    2.920000] ag71xx ag71xx.0 eth1: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
[    2.930000] TCP: cubic registered
[    2.930000] NET: Registered protocol family 17
[    2.940000] 8021q: 802.1Q VLAN Support v1.8
[    2.950000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    2.960000] Freeing unused kernel memory: 228k freed
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
[    6.860000] eth0: link up (1000Mbps/Full duplex)
- regular preinit -
jffs2 not ready yet; using ramdisk
- init -
[    9.620000] eth0: link down
[   10.580000] Compat-drivers backport release: compat-drivers-2013-01-21-1
[   10.580000] Backport based on wireless-testing.git master-2013-02-22
[   10.590000] compat.git: wireless-testing.git
[   10.620000] cfg80211: Calling CRDA to update world regulatory domain
[   10.630000] cfg80211: World regulatory domain updated:
[   10.630000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   10.640000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.650000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   10.660000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   10.660000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.670000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.040000] SCSI subsystem initialized
[   11.220000] usbcore: registered new interface driver usbfs
[   11.230000] usbcore: registered new interface driver hub
[   11.230000] usbcore: registered new device driver usb
[   11.970000] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2
[   11.970000] cfg80211: Calling CRDA for country: US
[   11.980000] cfg80211: Regulatory domain changed to country: US
[   11.980000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   11.990000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[   12.000000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[   12.010000] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.020000] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.020000] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.030000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[   14.000000] PPP generic driver version 2.4.2
[   14.270000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   14.400000] NET: Registered protocol family 24
[   14.540000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   14.540000] ehci-platform ehci-platform: Generic Platform EHCI Controller
[   14.550000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[   14.590000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[   14.610000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[   14.610000] hub 1-0:1.0: USB hub found
[   14.610000] hub 1-0:1.0: 1 port detected
[   14.720000] nf_conntrack version 0.5.0 (204 buckets, 816 max)
[   15.050000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[   15.350000] usbcore: registered new interface driver usbserial
[   15.360000] usbcore: registered new interface driver usbserial_generic
[   15.370000] usbserial: USB Serial support registered for generic
[   15.500000] Initializing USB Mass Storage driver...
[   15.500000] scsi0 : usb-storage 1-1:1.0
[   15.500000] usbcore: registered new interface driver usb-storage
[   15.510000] USB Mass Storage support registered.
[   15.630000] usbcore: registered new interface driver option
[   15.640000] usbserial: USB Serial support registered for GSM modem (1-port)
[   15.660000] spi_gpio spi_gpio.1: master is unqueued, this is deprecated
[   16.710000] scsi 0:0:0:0: Direct-Access     Kingston DataTraveler SE1 1.00 PQ: 0 ANSI: 0 CCS
[   16.800000] sd 0:0:0:0: [sda] 7557704 512-byte logical blocks: (3.86 GB/3.60 GiB)
[   16.810000] sd 0:0:0:0: [sda] Write Protect is off
[   16.820000] sd 0:0:0:0: [sda] No Caching mode page present
[   16.820000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   16.860000] sd 0:0:0:0: [sda] No Caching mode page present
[   16.870000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   16.880000]  sda: sda1
[   16.880000] sd 0:0:0:0: [sda] No Caching mode page present
[   16.890000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   16.890000] sd 0:0:0:0: [sda] Attached SCSI removable disk

Please press Enter to activate this console. [   27.530000] device eth0 entered promiscuous mode
[   28.140000] eth0: link up (1000Mbps/Full duplex)
[   28.150000] br-lan: port 1(eth0) entered forwarding state
[   28.150000] br-lan: port 1(eth0) entered forwarding state
[   30.150000] br-lan: port 1(eth0) entered forwarding state

SO what happens after this. Does your board get hanged or are you able to give commands on console.

nikhillife11 wrote:

Hello Mips,

Thanks for you reply. Actually I am using atheros u-boot and I want to port openwrt on it. Basically I have got a board from one of my friends... I am not understanding where to start. I had captured a log before which gave me the information about partitions. But when I tried to port kernel and rootfs code of openwrt, it gave me the above error. I can provide you any details you want... Let me know what you want and I can provide you the same.

Also i have to use existing u-boot as i have to return the board to my friend whenever he asks for. So how to go forward from here.

Regards
Nikhil

which target profile did you choose ?
the tplink-741 and ap121 reference board,ap121-mini are 9331 SoC as well.

Hello Banglang,

I am compiling for ap121 reference board. So can you let me know how to change partition table to suit mine.

Regards

Nikhil

Hi,

As I said before, you need to change it in image/Makefile , problem in your case was that default kernel partition was too small to fit openWRT kernel... so I assume you need to alter your partition layout. Good luck.

The discussion might have continued from here.