|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board March 21, 2014 03:03PM |
Admin Registered: 13 years ago Posts: 18,590 |
cesvcid=xxxxx ceboardver=PPV4A3 … ...
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board March 21, 2014 04:40PM |
Registered: 10 years ago Posts: 21 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board March 21, 2014 05:16PM |
Admin Registered: 13 years ago Posts: 18,590 |
0.000000] Linux version 2.6.31.8 (afenn@kt) (gcc version 4.3.2 (sdk3.3-ct-ng-1.4.1) ) #5 Wed Sep 28 12:09:12 PDT 2011 [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977 [ 0.000000] CPU: VIVT data cache, VIVT instruction cache [ 0.000000] Machine: Feroceon-KW [ 0.000000] Using UBoot passing parameters structure [ 0.000000] Ignoring unrecognised tag 0x41004345 [ 0.000000] Memory policy: ECC disabled, Data cache writeback [ 0.000000] Built 1 zonelists in Zone order, mobility grouping off. Total pages: 32512 [ 0.000000] Kernel command line: console=ttyS0,115200 root=ubi0:rootfs ubi.mtd=4,2048 rootfstype=ubifs
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board March 21, 2014 06:14PM |
Registered: 10 years ago Posts: 21 |
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index 78a7fac..93a5a30 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -205,6 +205,25 @@ struct tag_memclk {
u32 fmemclk;
};
+#define ATAG_MV_UBOOT 0x41000403
+struct tag_mv_uboot {
+ u32 uboot_version;
+ u32 tclk;
+ u32 sysclk;
+ u32 isUsbHost;
+ char macAddr[4][6];
+ u16 mtu[4];
+ u32 nand_ecc;
+};
+
+#define ATAG_CE_UBOOT 0x41004345
+#define CE_BOARDID "PPV4A3"
+struct tag_ce_uboot {
+ u32 ce_tagkey;
+ u32 ce_size;
+ char ce_boardid[32];
+};
+
struct tag {
struct tag_header hdr;
union {
@@ -227,6 +246,12 @@ struct tag {
* DC21285 specific
*/
struct tag_memclk memclk;
+
+ /*
+ * Marvell specific
+ */
+ struct tag_mv_uboot mv_uboot;
+ struct tag_ce_uboot ce_uboot;
} u;
};
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index a8295bf..74a0233 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -183,6 +183,95 @@ static void setup_end_tag(bd_t *bd)
params->hdr.size = 0;
}
+static void mvMacStrToHex(const char* macStr, unsigned char* macHex)
+{
+ int i;
+ char tmp[3];
+
+ for(i = 0; i < 6; i++)
+ {
+ tmp[0] = macStr[(i * 3) + 0];
+ tmp[1] = macStr[(i * 3) + 1];
+ tmp[2] = '\0';
+ macHex = (unsigned char) (simple_strtol(tmp, NULL, 16));
+ }
+}
+
+static void setup_mv_tag(struct tag **in_params)
+{
+ /* NOTE: only uboot_version, isUsbHost, ethaddr and mtu are parsed by kernel it seems */
+
+ params->hdr.tag = ATAG_MV_UBOOT;
+ params->hdr.size = tag_size (tag_mv_uboot);
+
+ /* taken from marvell u-boot */
+ /* everything >= 0x03040c00 has nand_ecc tag, on < 0x03040c00 a default of 0x1 is assumed */
+ #define VER_NUM 0x03041b00
+ params->u.mv_uboot.uboot_version = VER_NUM;
+
+ params->u.mv_uboot.nand_ecc = 1; // Pogoplug v4 stock environment
+
+ /* Pogoplug v4 is 6192A, which has boardID 0x2 or 0x3, depending on some extra thing I didn't look into.
+ * However, 6192A is "normally" misdetected as 6281A, which has boardId 0x0 or 0x1, see above.
+ * So one of these values should hopefully be correct */
+ unsigned int boardId = 0x2;
+ params->u.mv_uboot.uboot_version |= boardId; /* last byte of version is boardId */
+
+ #define MV_BOARD_TCLK_166MHZ 166666667 // Pogoplug v4 shoud use this
+ #define MV_BOARD_TCLK_200MHZ 200000000
+ params->u.mv_uboot.tclk = MV_BOARD_TCLK_166MHZ;
+
+ #define MV_BOARD_SYSCLK_100MHZ 100000000
+ #define MV_BOARD_SYSCLK_125MHZ 125000000
+ #define MV_BOARD_SYSCLK_133MHZ 133333333
+ #define MV_BOARD_SYSCLK_150MHZ 150000000
+ #define MV_BOARD_SYSCLK_166MHZ 166666667
+ #define MV_BOARD_SYSCLK_200MHZ 200000000 // Pogoplug v4 should use this
+ #define MV_BOARD_SYSCLK_233MHZ 233333333
+ #define MV_BOARD_SYSCLK_250MHZ 250000000
+ #define MV_BOARD_SYSCLK_267MHZ 266666667
+
+ params->u.mv_uboot.sysclk = MV_BOARD_SYSCLK_200MHZ;
+
+ /* meaning: USB controller 0 is host controller */
+ params->u.mv_uboot.isUsbHost = 1;
+
+ /* clear required fields for mtu and mac for all 4 possible gigeth ifaces on marvell feroceon */
+ int i;
+ for (i = 0; i < 4; i++)
+ {
+ memset(params->u.mv_uboot.macAddr, 0, sizeof(params->u.mv_uboot.macAddr));
+ params->u.mv_uboot.mtu = 0;
+ }
+
+ /* kirkwood only has one eth iface, so set only this one */
+ char *env;
+ env = getenv("ethaddr");
+ if (env)
+ mvMacStrToHex(env, params->u.mv_uboot.macAddr[0]);
+ env = getenv("ethmtu");
+ if (env)
+ params->u.mv_uboot.mtu[0] = simple_strtoul(env, NULL, 10);
+
+ params = tag_next (params);
+
+ printf("setup_mv_tag finished!\n");
+}
+
+static void setup_ce_tag(struct tag **in_params)
+{
+ /* NOTE: does not seem to be parsed by kernel at all... unless kernel source does not match binary */
+ params->hdr.tag = ATAG_CE_UBOOT;
+ params->hdr.size = tag_size (tag_ce_uboot);
+ params->u.ce_uboot.ce_tagkey = 0x5843453A;
+ params->u.ce_uboot.ce_size = sizeof(struct tag_ce_uboot);
+ strncpy(params->u.ce_uboot.ce_boardid, CE_BOARDID, sizeof(params->u.ce_uboot.ce_boardid));
+ params = tag_next (params);
+ printf("setup_ce_tag done.\n");
+ printf(CE_BOARDID);
+ printf("\n");
+}
+
__weak void setup_board_tags(struct tag **in_params) {}
static void do_nonsec_virt_switch(void)
@@ -236,6 +325,8 @@ static void boot_prep_linux(bootm_headers_t *images)
images->rd_end);
}
}
+ setup_mv_tag(¶ms);
+ setup_ce_tag(¶ms);
setup_board_tags(¶ms);
setup_end_tag(gd->bd);
} else {
|
GeoAoe
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board March 24, 2014 04:36AM |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board March 25, 2014 02:59PM |
Registered: 11 years ago Posts: 232 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board April 03, 2014 03:47PM |
Registered: 11 years ago Posts: 232 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board April 03, 2014 05:10PM |
Admin Registered: 13 years ago Posts: 18,590 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board April 11, 2014 03:43PM |
Admin Registered: 13 years ago Posts: 18,590 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board April 11, 2014 03:59PM |
Registered: 11 years ago Posts: 232 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board April 11, 2014 05:26PM |
Admin Registered: 13 years ago Posts: 18,590 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board May 10, 2014 06:43PM |
Admin Registered: 13 years ago Posts: 18,590 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board May 22, 2014 05:53PM |
Admin Registered: 13 years ago Posts: 18,590 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board May 26, 2014 06:18PM |
Admin Registered: 13 years ago Posts: 18,590 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board June 07, 2014 07:15PM |
Registered: 9 years ago Posts: 2 |
32a33,34 > # Ebbes uboot for pogov4, see: http://forum.doozan.com/read.php?3,14697,15533#msg-15533 > POGOV4_URL='http://forum.doozan.com/file.php?3,file=452,filename=uboot.mtd0_200MHz.kwb,download=1'; 61a64 > if [ "$UBOOT_PLATFORM" = "pogov4" ]; then return 0; fi 76a80,84 > if [ "$UBOOT_PLATFORM" = "pogov4" ]; then > echo "skip md5 for pogov4 $file_url" > wget -O "$file_dest" "$file_url" > return 0 > fi 245a254,255 > echo "b96574b1ee60d525be7e3c8bceeb6fda pogov4 ebbes-2014-03-19-current" >> "/tmp/valid-uboot.md5" > echo "ec62667e96e893c77f163f31b8d268cf pogov4 original" >> "/tmp/valid-uboot.md5" 397a408 > if [ "$UBOOT_PLATFORM" != "pogov4" ]; then 398a410 > fi 422a435 > if [ "$UBOOT_PLATFORM" = "pogov4" ]; then UBOOT_MTD0_URL=$POGOV4_URL; fi 510a524 > if [ "$UBOOT_PLATFORM" = "pogov4" ]; then ENV_ARCNUMBER="3960"; fi 566a581 > if [ "$UBOOT_PLATFORM" = "pogov4" ]; then $FW_SETENV machid F78; fi
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board June 08, 2014 02:23PM |
Registered: 10 years ago Posts: 4 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board July 04, 2014 01:58AM |
Admin Registered: 13 years ago Posts: 18,590 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board July 04, 2014 11:49AM |
Registered: 11 years ago Posts: 165 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board July 04, 2014 12:06PM |
Admin Registered: 13 years ago Posts: 18,590 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board July 04, 2014 01:05PM |
Registered: 11 years ago Posts: 165 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board July 04, 2014 10:09PM |
Registered: 13 years ago Posts: 21 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board July 05, 2014 12:29PM |
Registered: 11 years ago Posts: 232 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board July 17, 2014 02:11PM |
Registered: 9 years ago Posts: 94 |
This is already be done by "derdigge" in digital elite Board. I´m running one of my Pogos E02 with openWRT AA 12.09 and full package support.Quote
BTW, my current project is getting OpenWRT running on the internal PP flash
BusyBox v1.19.4 (2013-04-30 14:35:20 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
----------------------------------------------------------------------------
_____ __ __ __
/\ __`\ /\ \ __/\ \ /\ \__
\ \ \/\ \ ____ ___ __ ___ ___ \ \ \/\ \ \ \ _ __\ \ ,_\
\ \ \ \ \ /',__\ /'___\ /'__`\ /' __` __`\ \ \ \ \ \ \ \/\`'__\ \ \/
\ \ \_\ \/\__, `\/\ \__//\ \L\.\_/\ \/\ \/\ \ \ \ \_/ \_\ \ \ \/ \ \ \_
\ \_____\/\____/\ \____\ \__/.\_\ \_\ \_\ \_\ \ `\___x___/\ \_\ \ \__\
\/_____/\/___/ \/____/\/__/\/_/\/_/\/_/\/_/ '\/__//__/ \/_/ \/__/
----------------------------------------------------------------------------
Based on Attitude Adjustment, r36472 mod by derdigge
----------------------------------------------------------------------------
Weitere Informationen:
http://www.digital-eliteboard.com/showthread.php?228761
Kommandos:
oscam help
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board July 17, 2014 02:14PM |
Registered: 11 years ago Posts: 232 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board July 22, 2014 09:27PM |
Admin Registered: 13 years ago Posts: 18,590 |
# git checkout -b 2014.07-kirkwood 524123a70761110c5cf3ccc5f52f6d4da071b959 fatal: reference is not a tree: 524123a70761110c5cf3ccc5f52f6d4da071b959
# git checkout 524123a70761110c5cf3ccc5f52f6d4da071b959 fatal: reference is not a tree: 524123a70761110c5cf3ccc5f52f6d4da071b959
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board July 22, 2014 10:28PM |
Admin Registered: 13 years ago Posts: 18,590 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board July 24, 2014 02:34PM |
Admin Registered: 13 years ago Posts: 18,590 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board August 11, 2014 07:53PM |
Admin Registered: 13 years ago Posts: 18,590 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board August 12, 2014 08:32AM |
Registered: 11 years ago Posts: 232 |
|
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board August 12, 2014 11:24PM |
Admin Registered: 13 years ago Posts: 18,590 |
root@Dockstar:/localdisk/linux/uboot# ./kwboot-tool/kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.1.1.4-nsa325v2-uart.bin
Sending boot message. Please reboot the target...\
Sending boot image...
0 % [......................................................................]
1 % [......................................................................]
...
92 % [......................................................................]
94 % [......................................................................]
96 % [......................................................................]
98 % [......................................................................]
99 % [....]
[Type Ctrl-\ + c to quit]
__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__|
** MARVELL BOARD: DB-88F6282A-BP LE
U-Boot 1.1.4-bodhi (Aug 12 2014 - 21:09:42) Marvell version: 3.5.9
U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CFB00
Soc: 88F6282 A1CPU running @ 1600Mhz L2 running @ 800Mhz
SysClock = 533Mhz , TClock = 200Mhz
DRAM (DDR3) CAS Latency = 7 tRP = 8 tRAS = 24 tRCD=8
DRAM CS[0] base 0x00000000 size 512MB
DRAM Total size 512MB 16bit width
Addresses 10M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (10M - 7M): Done
NAND:128 MB
Flash: 0 kB
CPU : Marvell Feroceon (Rev 1)
Kernel address is 0x4640000.
Streaming disabled
Write allocate disabled
USB 0: host mode
[BlueDBG] reseting SoC Pex[0] 0 ...
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
[BlueDBG] reseting SoC Pex[1] 0 ...
[BlueDBG] reseting SoC Pex[1] 1 ...
[BlueDBG] reseting SoC Pex[1] 2 ...
[BlueDBG] reseting SoC Pex[1] 3 ...
[BlueDBG] reseting SoC Pex[1] 4 ...
[BlueDBG] reseting SoC Pex[1] 5 ...
[BlueDBG] reseting SoC Pex[1] 6 ...
[BlueDBG] reseting SoC Pex[1] 7 ...
[BlueDBG] reseting SoC Pex[1] 8 ...
[BlueDBG] reseting SoC Pex[1] 9 ...
[BlueDBG] reseting SoC Pex[1] 10 ...
PEX 1: interface detected no Link.
Net: egiga0 [PRIME]
Hit any key to stop autoboot: 0