New IT forum
27 June 2022, 06:27:02 pm *
Welcome, %1$s. Please login or register.

: MiraBox now in stock.
 
Pages: [1]

Author Topic: Updated Kernel for use with Debian?  (Read 16499 times)

apemberton

  • Full Member
  • ***
  • Posts: 187
Updated Kernel for use with Debian?
« on: 26 October 2012, 07:27:14 am »

I have loaded a hard disk with Wheezy through Debootstrap but I find that the Tonidoplug2 kernel is a customised 2.6.31 and so far I cannot find any later kernel to work correctly with wheezy (2.6.32 or later). I have seen references to a 3.1 kernel for archlinux but no binaries, sources or patches so far. I note there is no arcNumber or machid in u-boot and I see that the archlinux community used 2678 as per sheevaplug. I would be grateful if anyone has better advice as I do want to build an up to date kernel.

I have standardised on 3.4.4 for sheevaplugs, guruplugs, old Buffalo NAS and cuboxes but I see the current stable kernel is way ahead at 3.6.3 so I guess i will have to update generally in the not too distant future.
Logged
Tony Pemberton

apemberton

  • Full Member
  • ***
  • Posts: 187
Re: Updated Kernel for use with Debian?
« Reply #1 on: 01 November 2012, 05:10:39 pm »

Seems like I'm alone here with TP2!

Anyway, a useful link I have found is https://patchwork.kernel.org/patch/1619681/ though I cannot claim to have used the patches therein. I will attempt to work on kernel 3.6.3 but no promises or timescales.

Logged
Tony Pemberton

apemberton

  • Full Member
  • ***
  • Posts: 187
Re: Updated Kernel for use with Debian?
« Reply #2 on: 30 January 2013, 10:41:10 pm »

I'm a bit stuck! It seems that patches for a more modern kernel for usi topkick are meant to use a flattened device tree, and while I can get the kernel to compile and load, the u-boot bootm process fails with not recognising the device number (4101).

Code: [Select]
Marvell>> run bootcmd_sata

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
  Device 0 @ 0 0:
Model: Hitachi HTS541010A9E680                  Firm: JA0OA480 Ser#:       J8300076G17LTD
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)


3089768 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-3.7.2
   Created:      2013-01-28  23:32:23 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3089704 Bytes =  2.9 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00001005).

Available machine support:

ID (hex)        NAME
00000690        Marvell DB-88F6281-BP Development Board
00000691        Marvell RD-88F6192-NAS Development Board
00000692        Marvell RD-88F6281 Reference Board
0000078c        Marvell 88F6281 GTW GE Board
00000a76        Marvell eSATA SheevaPlug Reference Board
00000831        Marvell SheevaPlug Reference Board
00000a63        Marvell GuruPlug Reference Board
00000bb6        Seagate FreeAgent DockStar
0000085b        QNAP TS-119/TS-219
000009c6        QNAP TS-41x
00000b44        Marvell OpenRD Ultimate Board
00000939        Marvell OpenRD Client Board
00000915        Marvell OpenRD Base Board
0000089a        LaCie Network Space Max v2
000008a0        LaCie Internet Space v2
00000899        LaCie Network Space v2
0000089b        LaCie d2 Network v2
0000089e        LaCie 5Big Network v2
0000089c        LaCie 2Big Network v2
00000b1e        HP t5325 Thin Client
ffffffff        Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.


Although there were quite a number of Kernel Flattened Device Tree devices specified in the .config file (e.g. the Dreamplug) through 'make menuconfig', none appear as seen above. I can see that the compiled kernel does have the dtsi stuff in it (the system.map), the u-boot doesn't like it. I can see that the u-boot site has catered for FDT in at least the latest version.

OK, fine and I can do something about compiling a new u-boot (2013.01). However the current version is Marvell's 3.4.27 based on the old u-boot 1.1.4. Since I don't think the TP2 has an accessible JTAG port, I am reluctant to try flashing a new u-boot with the likleyhood of it failing and bricking the box.

I think I will give up on TP2's and use something more modern.
Logged
Tony Pemberton

Confusticated

  • New IT customer
  • Hero Member
  • *
  • Posts: 663
Re: Updated Kernel for use with Debian?
« Reply #3 on: 31 January 2013, 05:26:51 pm »

Quote
the u-boot bootm process fails with not recognising the device number
You are almost there, don't give up.

Quote
Error: unrecognized/unsupported machine ID (r1 = 0x00001005).
This report comes from the Linux kernel (kernel issue - not u-boot)

Quote
Available machine support:

ID (hex)        NAME
00000690        Marvell DB-88F6281-BP Development Board
00000691        Marvell RD-88F6192-NAS Development Board
00000692        Marvell RD-88F6281 Reference Board
0000078c        Marvell 88F6281 GTW GE Board
00000a76        Marvell eSATA SheevaPlug Reference Board
00000831        Marvell SheevaPlug Reference Board
00000a63        Marvell GuruPlug Reference Board
00000bb6        Seagate FreeAgent DockStar
0000085b        QNAP TS-119/TS-219
000009c6        QNAP TS-41x
00000b44        Marvell OpenRD Ultimate Board
00000939        Marvell OpenRD Client Board
00000915        Marvell OpenRD Base Board
0000089a        LaCie Network Space Max v2
000008a0        LaCie Internet Space v2
00000899        LaCie Network Space v2
0000089b        LaCie d2 Network v2
0000089e        LaCie 5Big Network v2
0000089c        LaCie 2Big Network v2
00000b1e        HP t5325 Thin Client
ffffffff        Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.

Where is the kernel TonidoPlug2 support  ?
Logged
Advocatus Diaboli - My agenda is not to give you the answer, but to guide your thoughts so you derive it for yourself!

apemberton

  • Full Member
  • ***
  • Posts: 187
Re: Updated Kernel for use with Debian?
« Reply #4 on: 01 February 2013, 12:28:26 am »

Quote
Error: unrecognized/unsupported machine ID (r1 = 0x00001005).
This report comes from the Linux kernel (kernel issue - not u-boot)

Actually the R1 value is from u-boot as it will change with u-boot env variable arcNumber or machid. The kernel is supplying the wrong number.

Although I still don't know why, I have moved on a bit in that looking at the kernel System.map file, the only Flattened Device Tree entry is for a generic KIRKWOOD_DT which naturally doesn't have a device number assigned. I will have to look into more detail at the patches and compatibility with generated 'include/generated/mach-types.h'. I'm sure the answer lies there. I will also experiment with using devio/mkimage to patch a zImage.

From what I can see from upcoming kernel 3.8, FDT is becoming mainstream for devices including Tonidoplug aka USI Topkick. But I'm not holding my breath.

Quote
Where is the kernel TonidoPlug2 support  ?
Where indeed. The only support for kernel updates seems to be coming from the ARCH Linux community and jason cooper but nothing from Tonido or CodeLathe. The Globalscale site only has binaries for the original 2.6.31 antique.

Logged
Tony Pemberton

apemberton

  • Full Member
  • ***
  • Posts: 187
Re: Updated Kernel for use with Debian?
« Reply #5 on: 02 February 2013, 10:11:42 am »

Having looked deeper into the kernel 3.7.5 coding, I can see that the arcNumber for flattened device tree is suppressed as in file 'arch/arm/include/asm/mach/arch.h'. The device number is set as '(~0)' which corresponds with the value returned above. Further, individual system types (such as dreamplug FDT) are not parsed. As the TonidoPlug2 uses the Marvell 88F6282 (as opposed to most other Kirkwood systems with the 88F6281), there is a slight difference in pinouts.

I was wondering what the flattened Device Tree kernel architecture was for but, from reading patches, I gather that the kernel will probe the hardware to determine which devices in SoC's are to be enabled. Plainly there is much activity in this area in readiness for upcoming 3.8 kernel versions - including making Topkick mainline. In view of this, I shall let my TP2's moulder for a few more months and pay more attention to other projects. The old Buffalo Linkstation Pro's (slow Orion 88F5281) will have a reprieve from the computer scrapyard! Next to attach a Raspberry to the boiler!
Logged
Tony Pemberton

apemberton

  • Full Member
  • ***
  • Posts: 187
Re: Updated Kernel for use with Debian?
« Reply #6 on: 02 February 2013, 06:20:20 pm »

Ok, I'm compiling kernel 3.8-rc6 which DOES have USI Topkick FDT as an original mainline option. I don't think a testing version should be used for production but it will help try out the TP2.
Logged
Tony Pemberton

apemberton

  • Full Member
  • ***
  • Posts: 187
Re: Updated Kernel for use with Debian?
« Reply #7 on: 21 February 2013, 06:40:56 pm »

Well I still havn't got a Kernel 3.8 (its there on Kernel.org but not as stable) with flattened device tree to work. It has USI Topkick in the menuconfig (and many other fdt devices including the dreamplug) but although i get a clean compile, it will not boot. I changed the u-boot environment machid to both 1005 and ffffffff and the arcNumber to 4101 and the decimal equivalent of 0xffffffff to see if that would make any difference. I don't know why it won't boot and I can't find any useful how-to's for it. I have a feeling that, as u-boot is getting flatted device tree settings (BTW the FDT site is www.devicetree.org) there is a requirement to update u-boot - but I could well be wrong!

However, I now have a 3.7.7 kernel working on a TP2 with debian thanks to the site at https://sites.google.com/site/armtechie2017/home/tonido-plug-2 which has links to a config file and patch for an non-fdt version. I cannot claim to have fully tested yet - installation of Debian apps from the repository is going on as I write this, but it *IS* promising at last. Thanks to Edward Nielsen for his work.

Logged
Tony Pemberton

apemberton

  • Full Member
  • ***
  • Posts: 187
Re: Updated Kernel for use with Debian?
« Reply #8 on: 22 February 2013, 04:26:28 pm »

Another update - sorry to be a bore!

Some proof of operation!

Code: [Select]
[email protected]:/# dmesg
Booting Linux on physical CPU 0
Initializing cgroup subsys cpu
Linux version 3.7.7 ([email protected]) (gcc version 4.6.3 (Debian 4.6.3-15) ) #4 PREEMPT Fri Feb 22 00:22:49 GMT 2013
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell Tonido2 Reference Board
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 131072
free_area_init_node: node 0, pgdat c05fee58, node_mem_map c065d000
  Normal zone: 1024 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 130048 pages, LIFO batch:31
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttyS0,115200 root=/dev/sda2 rw rootwait
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 512MB = 512MB total
Memory: 513236k/513236k available, 11052k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc0598e5c   (5700 kB)
      .init : 0xc0599000 - 0xc05bfb4c   ( 155 kB)
      .data : 0xc05c0000 - 0xc0602728   ( 266 kB)
       .bss : 0xc060274c - 0xc065c52c   ( 360 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:114
sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474ms
Console: colour dummy device 80x30
Calibrating delay loop... 789.70 BogoMIPS (lpj=3948544)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys cpuacct
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys blkio
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x4359b8 - 0x4359f4
devtmpfs: initialized
NET: Registered protocol family 16
DMA: preallocated 1024 KiB pool for atomic coherent allocations
Kirkwood: MV88F6282-Rev-A1, TCLK=200000000.
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.
initial MPP regs: 01111111 03303311 00051100 00000000 00000000 00000000 00000000
  final MPP regs: 01111111 03303311 00051100 00000000 00000000 00000000 00000000
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource orion_clocksource
FS-Cache: Loaded
NET: Registered protocol family 2
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 0 bytes, default 32
FS-Cache: Netfs 'nfs' registered for caching
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
JFS: nTxBlock = 4009, nTxLock = 32077
msgmni has been set to 1002
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
loop: module loaded
sata_mv sata_mv.0: version 1.28
sata_mv sata_mv.0: cannot get optional clkdev
sata_mv sata_mv.0: slots 32 ports 1
scsi0 : sata_mv
ata1: SATA max UDMA/133 irq 21
NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit), page size: 2048, OOB size: 64
Scanning device for bad blocks
Bad eraseblock 804 at 0x000006480000
Bad eraseblock 1385 at 0x00000ad20000
Bad eraseblock 1978 at 0x00000f740000
Bad eraseblock 2102 at 0x0000106c0000
Bad eraseblock 2521 at 0x000013b20000
Bad eraseblock 2564 at 0x000014080000
Bad eraseblock 2598 at 0x0000144c0000
Bad eraseblock 2794 at 0x000015d40000
Bad eraseblock 3320 at 0x000019f00000
Bad eraseblock 3538 at 0x00001ba40000
Bad eraseblock 3540 at 0x00001ba80000
Bad eraseblock 3544 at 0x00001bb00000
Bad eraseblock 4000 at 0x00001f400000
Creating 4 MTD partitions on "orion_nand":
0x000000000000-0x000000180000 : "u-boot"
0x000000180000-0x0000001a0000 : "u-boot-env"
0x000000200000-0x000000800000 : "uImage"
0x000000800000-0x000020000000 : "root"
mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
libphy: mv643xx_eth smi: probed
mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 40:2c:f4:bc:8a:3d
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mousedev: PS/2 mouse device common for all mice
rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
i2c /dev entries driver
cpuidle: using governor ladder
cpuidle: using governor menu
Registered led device: plug:sata:activity
Registered led device: plug:red:health
Registered led device: plug:blue:health
Registered led device: plug:green:health
Registered led device: plug:yellow:health
ata1.00: ATA-8: SAMSUNG HN-M101MBB, 2AR10001, max UDMA/133
ata1.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
NET: Registered protocol family 10
ata1.00: configured for UDMA/133
NET: Registered protocol family 17
Key type dns_resolver registered
registered taskstats version 1
rtc-mv rtc-mv: setting system clock to 2013-02-22 15:30:14 UTC (1361547014)
scsi 0:0:0:0: Direct-Access     ATA      SAMSUNG HN-M101M 2AR1 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI disk
EXT3-fs (sda2): error: couldn't mount because of unsupported optional features (240)
EXT2-fs (sda2): error: couldn't mount because of unsupported optional features (240)
EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 8:2.
devtmpfs: mounted
Freeing init memory: 152K
udevd[701]: starting version 175
EXT4-fs (sda2): re-mounted. Opts: (null)
EXT4-fs (sda2): re-mounted. Opts: (null)
fuse init (API version 7.20)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

System prompt:-
Code: [Select]
login as: root
        _,met$$$$$gg.
     ,g$$$$$$$$$$$$$$$P.
   ,g$$P""       """Y$$.".
  ,$$P'              `$$$.
',$$P       ,ggs.     `$$b:
`d$$'     ,$P"'   .    $$$                               ,#.
 $$P      d$'     ,    $$P      ##:          :##        :###:
 $$:      $$.   -    ,d$$'      ##'          `##         `#'
 $$;      Y$b._   _,d$P'    __  ##     __     ##  __      _     __          _
 Y$$.    `.`"Y$$$$P"'     ,####:##  ,######.  ##.#####. :### ,######. ###.####:
 `$$b      "-.__         ,##' `###  ##:  :##  ###' `###  ##' #:   `## `###' `##:
  `Y$$b                  ##    `##  ##    ##  ##'   `##  ##    ___,##  ##:   `##
   `Y$$.                 ##     ##  #######:  ##     ##  ##  .#######  ##'    ##
     `$$b.               ##     ##  ##'       ##     ##  ##  ##'  `##  ##     ##
       `Y$$b.            ##.   ,##  ##        ##    ,##  ##  ##    ##  ##     ##
         `"Y$b._         :#:._,###  ##:__,##  ##:__,##' ,##. ##.__:##. ##     ##
             `""""       `:#### ###  ######'  `######'  #### `#####"## ##     ##

                               Debian Version 7.0
     Linux Version 3.7.7, Compiled #4 PREEMPT Fri Feb 22 00:22:49 GMT 2013
          One ARM Feroceon Processor, 512M RAM, 789.70 Bogomips Total
                                     Mail1



Debian GNU/Linux 7.0 \n \l

[email protected]'s password:
Linux Mail1 3.7.7 #4 PREEMPT Fri Feb 22 00:22:49 GMT 2013 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Feb 22 15:31:14 2013
[email protected]:~# cd /

Patch File tonido2-patch-3.5-techie2017:-
Code: [Select]
--- linux-3.2-pristine/arch/arm/mach-kirkwood/tonido2-setup.c   1969-12-31 17:00:00.000000000 -0700
+++ linux-3.2/arch/arm/mach-kirkwood/tonido2-setup.c    2012-01-09 14:18:46.931646203 -0700
@@ -0,0 +1,159 @@
+/*
+ * arch/arm/mach-kirkwood/tonido2-setup.c
+ *
+ * Marvell Tonido2 Reference Board Setup
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/ata_platform.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mv643xx_eth.h>
+#include <linux/gpio.h>
+#include <linux/leds.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <mach/kirkwood.h>
+#include <plat/mvsdio.h>
+#include "common.h"
+#include "mpp.h"
+
+static struct mtd_partition tonido2plug_nand_parts[] = {
+       {
+               .name = "u-boot",
+               .offset = 0,
+               .size = 0x180000
+       }, {
+               .name = "u-boot-env",
+               .offset = 0x180000,
+               .size = 0x20000
+       }, {
+               .name = "uImage",
+               .offset = 0x200000,
+               .size = 0x600000
+       }, {
+               .name = "root",
+               .offset = 0x800000,
+               .size = 0x1f800000
+       },
+};
+
+static struct mv643xx_eth_platform_data tonido2plug_ge00_data = {
+       .phy_addr       = MV643XX_ETH_PHY_ADDR(0),
+};
+
+static struct mv_sata_platform_data tonido2_sata_data = {
+       .n_ports        = 1,
+};
+
+/*
+static struct mvsdio_platform_data tonido2plug_mvsdio_data = {
+};
+*/
+/* unfortunately the CD signal has not been connected */
+
+
+/*
+static struct mvsdio_platform_data tonido2_esata_mvsdio_data = {
+       .gpio_write_protect = 44,
+       .gpio_card_detect = 47,
+};
+*/
+/* MPP44 used as SD write protect */
+/* MPP47 used as SD card detect */
+
+static struct gpio_led tonido2plug_led_pins[] = {
+       {
+               .name                   = "plug:sata:activity",
+               .default_trigger        = "default-off",
+               .gpio                   = 21,
+               .active_low             = 1,
+       },
+       {
+               .name                   = "plug:red:health",
+               .default_trigger        = "default-off",
+               .gpio                   = 37,
+               .active_low             = 1,
+       },
+       {
+               .name                   = "plug:blue:health",
+               .default_trigger        = "default-off",
+               .gpio                   = 38,
+               .active_low             = 1,
+       },
+       {
+               .name                   = "plug:green:health",
+               .default_trigger        = "default-on",
+               .gpio                   = 39,
+               .active_low             = 1,
+       },
+       {
+               .name                   = "plug:yellow:health",
+               .default_trigger        = "default-off",
+               .gpio                   = 48,
+               .active_low             = 1,
+       },
+
+};
+
+static struct gpio_led_platform_data tonido2plug_led_data = {
+       .leds           = tonido2plug_led_pins,
+       .num_leds       = ARRAY_SIZE(tonido2plug_led_pins),
+};
+
+static struct platform_device tonido2plug_leds = {
+       .name   = "leds-gpio",
+       .id     = -1,
+       .dev    = {
+               .platform_data  = &tonido2plug_led_data,
+       }
+};
+
+static unsigned int tonido2_mpp_config[] __initdata = {
+       MPP29_GPIO,     /* USB Power Enable */
+       MPP21_GPIO,     /* LED BLUE SATA Activity  */
+       MPP37_GPIO,     /* LED RED */
+       MPP38_GPIO,     /* LED GREEN */
+       MPP39_GPIO,     /* LED BLUE */
+       MPP48_GPIO,     /* LED YELLOW */
+       0
+};
+
+static void __init tonido2plug_init(void)
+{
+       /*
+        * Basic setup. Needs to be called early.
+        */
+       kirkwood_init();
+
+       /* setup gpio pin select */
+       kirkwood_mpp_conf(tonido2_mpp_config);
+       kirkwood_uart0_init();
+       kirkwood_nand_init(ARRAY_AND_SIZE(tonido2plug_nand_parts), 25);
+
+       if (gpio_request(29, "USB Power Enable") != 0 ||
+           gpio_direction_output(29, 1) != 0)
+               printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n");
+       kirkwood_ehci_init();
+       kirkwood_ge00_init(&tonido2plug_ge00_data);
+
+       /* lower power consumption for plugs if SATA is not initalized .5 watt */
+       kirkwood_sata_init(&tonido2_sata_data);
+       platform_device_register(&tonido2plug_leds);
+}
+
+MACHINE_START(TOPKICK, "Marvell Tonido2 Reference Board")
+        .atag_offset    = 0x100,
+       .init_machine   = tonido2plug_init,
+       .map_io         = kirkwood_map_io,
+       .init_early     = kirkwood_init_early,
+       .init_irq       = kirkwood_init_irq,
+       .timer          = &kirkwood_timer,
+MACHINE_END
+
+
--- linux-3.2-pristine/arch/arm/mach-kirkwood/Kconfig   2012-01-04 16:55:44.000000000 -0700
+++ linux-3.2/arch/arm/mach-kirkwood/Kconfig    2012-01-09 13:27:45.346958005 -0700
@@ -38,6 +38,12 @@
          Say 'Y' here if you want your kernel to support the
          Marvell eSATA SheevaPlug Reference Board.

+config MACH_TOPKICK
+       bool "Marvell Tonido2  Reference Board"
+       help
+         Say 'Y' here if you want your kernel to support the
+         Marvell Tonido2 Reference Board.
+
 config MACH_GURUPLUG
        bool "Marvell GuruPlug Reference Board"
        help
--- linux-3.2-pristine/arch/arm/mach-kirkwood/Makefile  2012-01-04 16:55:44.000000000 -0700
+++ linux-3.2/arch/arm/mach-kirkwood/Makefile   2012-01-09 13:30:52.571922319 -0700
@@ -6,6 +6,7 @@
 obj-$(CONFIG_MACH_MV88F6281GTW_GE)     += mv88f6281gtw_ge-setup.o
 obj-$(CONFIG_MACH_SHEEVAPLUG)          += sheevaplug-setup.o
 obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG)    += sheevaplug-setup.o
+obj-$(CONFIG_MACH_TOPKICK)             += tonido2-setup.o
 obj-$(CONFIG_MACH_GURUPLUG)            += guruplug-setup.o
 obj-$(CONFIG_MACH_DOCKSTAR)            += dockstar-setup.o
 obj-$(CONFIG_MACH_TS219)               += ts219-setup.o tsx1x-common.o


I cannot post the .config file as it will exceed post message length.

Pity NewIT do not have a user upload directory!
Logged
Tony Pemberton

apemberton

  • Full Member
  • ***
  • Posts: 187
Re: Updated Kernel for use with Debian?
« Reply #9 on: 07 July 2013, 11:43:48 am »

At Last! I have finally got a working device tree kernel for my TP2's
Code: [Select]
login as: root
        _,met$$$$$gg.
     ,g$$$$$$$$$$$$$$$P.
   ,g$$P""       """Y$$.".
  ,$$P'              `$$$.
',$$P       ,ggs.     `$$b:
`d$$'     ,$P"'   .    $$$                               ,#.
 $$P      d$'     ,    $$P      ##:          :##        :###:
 $$:      $$.   -    ,d$$'      ##'          `##         `#'
 $$;      Y$b._   _,d$P'    __  ##     __     ##  __      _     __          _
 Y$$.    `.`"Y$$$$P"'     ,####:##  ,######.  ##.#####. :### ,######. ###.####:
 `$$b      "-.__         ,##' `###  ##:  :##  ###' `###  ##' #:   `## `###' `##:
  `Y$$b                  ##    `##  ##    ##  ##'   `##  ##    ___,##  ##:   `##
   `Y$$.                 ##     ##  #######:  ##     ##  ##  .#######  ##'    ##
     `$$b.               ##     ##  ##'       ##     ##  ##  ##'  `##  ##     ##
       `Y$$b.            ##.   ,##  ##        ##    ,##  ##  ##    ##  ##     ##
         `"Y$b._         :#:._,###  ##:__,##  ##:__,##' ,##. ##.__:##. ##     ##
             `""""       `:#### ###  ######'  `######'  #### `#####"## ##     ##

                           Debian Version jessie/sid
     Linux Version 3.10.0, Compiled #2 PREEMPT Sat Jul 6 20:39:24 BST 2013
              One ARM  Processor, 512M RAM, 789.70 Bogomips Total
                                      MX2



Debian GNU/Linux jessie/sid \n \l

[email protected]'s password:
Linux MX2 3.10.0 #2 PREEMPT Sat Jul 6 20:39:24 BST 2013 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Jul  7 12:07:11 2013

I have not had to make code patches or changes for TP2 and the u-boot remains as stock (1.1.4 basically). The config file has been posted in an email to NewIT since I cannot post the text here.
  
There are far too many modules but as I'm booting from a 1TB drive, space isn't really an issue.
Logged
Tony Pemberton

warren99

  • Newbie
  • *
  • Posts: 2
Re: Updated Kernel for use with Debian?
« Reply #10 on: 22 November 2013, 12:11:25 pm »


Web useful in many ways, my many friends and also sharing.
Experience with your friends from the web.
Logged
Pages: [1]
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!