* [Buildroot] [PATCH v2 1/2] uccp420wlan: new package
@ 2017-02-15 7:33 Abhimanyu V
2017-02-15 7:33 ` [Buildroot] [PATCH v2 2/2] Add defconfig for MIPS Creator ci40 Abhimanyu V
2017-02-16 21:34 ` [Buildroot] [PATCH v2 1/2] uccp420wlan: new package Arnout Vandecappelle
0 siblings, 2 replies; 8+ messages in thread
From: Abhimanyu V @ 2017-02-15 7:33 UTC (permalink / raw)
To: buildroot
From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
Wifi kernel module and firmware for Imagination explorer RPU
Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
Reviewed-by: Rahul Bedarkar <Rahul.Bedarkar@imgtec.com>
---
Changes v1->v2
- add hash file
package/Config.in | 1 +
...001-fix-compilation-error-with-kernel-4.4.patch | 90 ++++++++++++++++++++++
package/uccp420wlan/Config.in | 13 ++++
package/uccp420wlan/uccp420wlan.hash | 2 +
package/uccp420wlan/uccp420wlan.mk | 20 +++++
5 files changed, 126 insertions(+)
create mode 100644 package/uccp420wlan/0001-fix-compilation-error-with-kernel-4.4.patch
create mode 100644 package/uccp420wlan/Config.in
create mode 100644 package/uccp420wlan/uccp420wlan.hash
create mode 100644 package/uccp420wlan/uccp420wlan.mk
diff --git a/package/Config.in b/package/Config.in
index deff0fe..ef5f849 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -474,6 +474,7 @@ endmenu
source "package/ti-uim/Config.in"
source "package/ti-utils/Config.in"
source "package/triggerhappy/Config.in"
+ source "package/uccp420wlan/Config.in"
source "package/uboot-tools/Config.in"
source "package/ubus/Config.in"
source "package/udev/Config.in"
diff --git a/package/uccp420wlan/0001-fix-compilation-error-with-kernel-4.4.patch b/package/uccp420wlan/0001-fix-compilation-error-with-kernel-4.4.patch
new file mode 100644
index 0000000..43026b8
--- /dev/null
+++ b/package/uccp420wlan/0001-fix-compilation-error-with-kernel-4.4.patch
@@ -0,0 +1,90 @@
+commit b5f449a2c48d2fe7c9341b32fea5a62dd6699e38
+Author: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
+Date: Mon Jan 2 16:15:22 2017 +0530
+
+ Fix compilation error with kernel 4.4
+
+ Revert "Fix errors/warnings while compiling against kmod-mac80211"
+
+ This reverts commit e62baef655898526c69250bc63723241f3f4c46d.
+
+ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
+
+diff --git a/src/80211_if.c b/src/80211_if.c
+index 6291194..5ce61b7 100644
+--- a/src/80211_if.c
++++ b/src/80211_if.c
+@@ -1467,7 +1467,9 @@ static void init_hw(struct ieee80211_hw *hw)
+
+ static int ampdu_action(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif,
+- struct ieee80211_ampdu_params *params)
++ enum ieee80211_ampdu_mlme_action action,
++ struct ieee80211_sta *sta,
++ u16 tid, u16 *ssn, u8 buf_size, bool amsdu)
+ {
+ int ret = 0;
+ unsigned int val = 0;
+@@ -1476,14 +1478,14 @@ static int ampdu_action(struct ieee80211_hw *hw,
+ UCCP_DEBUG_80211IF("%s-80211IF: ampdu action started\n",
+ ((struct mac80211_dev *)(hw->priv))->name);
+ /* TODO */
+- switch (params->action) {
++ switch (action) {
+ case IEEE80211_AMPDU_RX_START:
+ {
+- val = params->tid | TID_INITIATOR_AP;
++ val = tid | TID_INITIATOR_AP;
+ dev->tid_info[val].tid_state = TID_STATE_AGGR_START;
+- dev->tid_info[val].ssn = params->ssn;
++ dev->tid_info[val].ssn = *ssn;
+ uccp420wlan_prog_ba_session_data(1,
+- params->tid,
++ tid,
+ &dev->tid_info[val].ssn,
+ 1,
+ vif->addr,
+@@ -1492,10 +1494,10 @@ static int ampdu_action(struct ieee80211_hw *hw,
+ break;
+ case IEEE80211_AMPDU_RX_STOP:
+ {
+- val = params->tid | TID_INITIATOR_AP;
++ val = tid | TID_INITIATOR_AP;
+ dev->tid_info[val].tid_state = TID_STATE_AGGR_STOP;
+ uccp420wlan_prog_ba_session_data(0,
+- params->tid,
++ tid,
+ &dev->tid_info[val].ssn,
+ 1,
+ vif->addr,
+@@ -1504,24 +1506,24 @@ static int ampdu_action(struct ieee80211_hw *hw,
+ break;
+ case IEEE80211_AMPDU_TX_START:
+ {
+- val = params->tid | TID_INITIATOR_STA;
+- ieee80211_start_tx_ba_cb_irqsafe(vif, params->sta->addr, params->tid);
++ val = tid | TID_INITIATOR_STA;
++ ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
+ dev->tid_info[val].tid_state = TID_STATE_AGGR_START;
+- dev->tid_info[val].ssn = params->ssn;
++ dev->tid_info[val].ssn = *ssn;
+ }
+ break;
+ case IEEE80211_AMPDU_TX_STOP_FLUSH:
+ case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
+ case IEEE80211_AMPDU_TX_STOP_CONT:
+ {
+- val = params->tid | TID_INITIATOR_STA;
++ val = tid | TID_INITIATOR_STA;
+ dev->tid_info[val].tid_state = TID_STATE_AGGR_STOP;
+- ieee80211_stop_tx_ba_cb_irqsafe(vif, params->sta->addr, params->tid);
++ ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
+ }
+ break;
+ case IEEE80211_AMPDU_TX_OPERATIONAL:
+ {
+- val = params->tid | TID_INITIATOR_STA;
++ val = tid | TID_INITIATOR_STA;
+ dev->tid_info[val].tid_state = TID_STATE_AGGR_OPERATIONAL;
+ }
+ break;
diff --git a/package/uccp420wlan/Config.in b/package/uccp420wlan/Config.in
new file mode 100644
index 0000000..8f0df12
--- /dev/null
+++ b/package/uccp420wlan/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_UCCP420WLAN
+ bool "uccp420wlan"
+ depends on BR2_LINUX_KERNEL
+ help
+ SoftMAC (mac80211) based WiFi driver for Imagination's Explorer RPU uccp420.
+ This supports Dual Band WiFi with 2.4GHz - 2x2 b/g/n 40MHz, 5GHz - 2x2 a/n/11ac 80MHz modes
+
+ Used in creator ci40 board.
+
+ https://github.com/CreatorDev/uccp420wlan
+
+comment "uccp420wlan needs a Linux kernel to be built"
+ depends on !BR2_LINUX_KERNEL
diff --git a/package/uccp420wlan/uccp420wlan.hash b/package/uccp420wlan/uccp420wlan.hash
new file mode 100644
index 0000000..9e54f21
--- /dev/null
+++ b/package/uccp420wlan/uccp420wlan.hash
@@ -0,0 +1,2 @@
+# locally computed hash
+sha256 c5b1194cb9fae049169b261548eaf18d87afce1c7388f7a0366bb5dd2a56cdb2 uccp420wlan-v6.9.tar.gz
diff --git a/package/uccp420wlan/uccp420wlan.mk b/package/uccp420wlan/uccp420wlan.mk
new file mode 100644
index 0000000..f3c8064
--- /dev/null
+++ b/package/uccp420wlan/uccp420wlan.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# uccp420wlan
+#
+################################################################################
+
+UCCP420WLAN_VERSION = v6.9
+UCCP420WLAN_SITE = $(call github,CreatorDev,uccp420wlan,$(UCCP420WLAN_VERSION))
+UCCP420WLAN_LICENSE = GPLv2 (kernel module), proprietary (firmware blob)
+UCCP420WLAN_LICENSE_FILES = COPYING
+
+define UCCP420WLAN_INSTALL_FIRMWARE
+ mkdir -p $(TARGET_DIR)/lib/firmware/img/uccp420wlan
+ cp $(@D)/firmware/*.ldr $(TARGET_DIR)/lib/firmware/img/uccp420wlan
+endef
+
+UCCP420WLAN_POST_INSTALL_TARGET_HOOKS += UCCP420WLAN_INSTALL_FIRMWARE
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2 2/2] Add defconfig for MIPS Creator ci40
2017-02-15 7:33 [Buildroot] [PATCH v2 1/2] uccp420wlan: new package Abhimanyu V
@ 2017-02-15 7:33 ` Abhimanyu V
2017-02-16 21:57 ` Arnout Vandecappelle
2017-02-16 21:34 ` [Buildroot] [PATCH v2 1/2] uccp420wlan: new package Arnout Vandecappelle
1 sibling, 1 reply; 8+ messages in thread
From: Abhimanyu V @ 2017-02-15 7:33 UTC (permalink / raw)
To: buildroot
From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
Reviewed-by: Rahul Bedarkar <Rahul.Bedarkar@imgtec.com>
---
Changes v1 -> v2
- No change
board/ci40/readme.txt | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
configs/ci40_defconfig | 27 +++++++++++++++++++++++++++
2 files changed, 76 insertions(+)
create mode 100644 board/ci40/readme.txt
create mode 100644 configs/ci40_defconfig
diff --git a/board/ci40/readme.txt b/board/ci40/readme.txt
new file mode 100644
index 0000000..8ce7ed8
--- /dev/null
+++ b/board/ci40/readme.txt
@@ -0,0 +1,49 @@
+*********************
+* MIPS Creator CI40 *
+*********************
+
+The 'ci40_defconfig' will create a root filesystem and a kernel image
+under the 'output/images/' directory. This document will try to explain how
+to use them in order to run Buildroot in the MIPS Creator CI40 board.
+
+The current bootloader by default boot fitImage, so we would need to create
+command to be able to boot from uImage. Assuming you are at the U-Boot prompt
+of the MIPS Creator CI40, you can use following way to boot.
+
+Booting from network (nfsboot)
+------------------------------
+ pistachio # setenv netboot_legacy 'sf probe 1:0;mtdparts default;setenv bootargs $console $earlycon $netroot nfsroot=$serverip:$rootpath $bootextra $mtdparts;dhcp $loadaddr $legacy_bootfile; dhcp $fdtaddr $fdtfile;'
+
+ pistachio # run netboot_legacy
+
+ It will set variable to boot from tftp server and uses nfsroot
+
+Booting from USB/MMC
+--------------------
+Extract the generated root filesystem, uImage and dtb file into a USB drive
+or SD-Card. Here you have the instructions to boot from the two of them.
+You have to choose the one your prefer:
+
+From USB
+ pistachio # setenv usbboot_legacy 'sf probe 1:0;mtdparts default;setenv bootargs $console $earlycon $usbroot $bootextra $mtdparts;usb start;ext4load usb $usbdev $fdtaddr $bootdir$fdtfile;ext4load usb $usbdev $loadaddr $bootdir$legacy_bootfile;'
+
+ pistachio # run usbboot_legacy
+
+From SD-Card
+ pistachio # setenv mmcboot_legacy 'sf probe 1:0;mtdparts default;setenv bootargs $console $earlycon $mmcroot $bootextra $mtdparts;setenv verify n;mmcinfo; mmc dev $mmcdev;ext4load mmc $mmcdev $fdtaddr $bootdir$fdtfile;ext4load mmc $mmcdev $loadaddr $bootdir$legacy_bootfile;'
+
+ pistachio # run mmcboot_legacy
+
+Finally boot from the loaded file:
+
+ pistachio # bootm $loadaddr - $fdtaddr;
+
+
+Online docs
+-----------
+mostly for openwrt but it also applicable on buildroot
+https://docs.creatordev.io/ci40/guides/openwrt-platform/#overview
+
+Prebuilt uboot
+--------------
+http://downloads.creatordev.io/?q=u-boot/
diff --git a/configs/ci40_defconfig b/configs/ci40_defconfig
new file mode 100644
index 0000000..5363347
--- /dev/null
+++ b/configs/ci40_defconfig
@@ -0,0 +1,27 @@
+BR2_mipsel=y
+BR2_mips_32r2=y
+# BR2_MIPS_SOFT_FLOAT is not set
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS=y
+BR2_TARGET_GENERIC_HOSTNAME="Ci40"
+BR2_TARGET_GENERIC_ISSUE="Welcome to Ci40"
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS1"
+BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
+BR2_SYSTEM_DHCP="eth0"
+BR2_ENABLE_LOCALE_WHITELIST="C en_US en_GB"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/CreatorDev/linux.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="2319a2476a2bc0c582a9811cd45a6fa3c0beba37"
+BR2_LINUX_KERNEL_DEFCONFIG="pistachio"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="img/pistachio_marduk"
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_UCCP420WLAN=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="pistachio_marduk"
+BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
+BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/CreatorDev/u-boot/archive/v1.0.4.tar.gz"
+# BR2_TARGET_UBOOT_FORMAT_BIN is not set
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-pistachio_marduk-2015.10-v1.0.4.img"
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2 1/2] uccp420wlan: new package
2017-02-15 7:33 [Buildroot] [PATCH v2 1/2] uccp420wlan: new package Abhimanyu V
2017-02-15 7:33 ` [Buildroot] [PATCH v2 2/2] Add defconfig for MIPS Creator ci40 Abhimanyu V
@ 2017-02-16 21:34 ` Arnout Vandecappelle
2017-02-17 6:44 ` Abhimanyu V
1 sibling, 1 reply; 8+ messages in thread
From: Arnout Vandecappelle @ 2017-02-16 21:34 UTC (permalink / raw)
To: buildroot
On 15-02-17 08:33, Abhimanyu V wrote:
> From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
>
> Wifi kernel module and firmware for Imagination explorer RPU
>
> Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
> Reviewed-by: Rahul Bedarkar <Rahul.Bedarkar@imgtec.com>
[snip]
> diff --git a/package/uccp420wlan/0001-fix-compilation-error-with-kernel-4.4.patch b/package/uccp420wlan/0001-fix-compilation-error-with-kernel-4.4.patch
> new file mode 100644
> index 0000000..43026b8
> --- /dev/null
> +++ b/package/uccp420wlan/0001-fix-compilation-error-with-kernel-4.4.patch
> @@ -0,0 +1,90 @@
> +commit b5f449a2c48d2fe7c9341b32fea5a62dd6699e38
> +Author: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
> +Date: Mon Jan 2 16:15:22 2017 +0530
> +
> + Fix compilation error with kernel 4.4
> +
> + Revert "Fix errors/warnings while compiling against kmod-mac80211"
> +
> + This reverts commit e62baef655898526c69250bc63723241f3f4c46d.
Is this patch submitted upstream? Or if it is not for upstream, please specify
why not.
> +
> + Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
[snip]
> diff --git a/package/uccp420wlan/Config.in b/package/uccp420wlan/Config.in
> new file mode 100644
> index 0000000..8f0df12
> --- /dev/null
> +++ b/package/uccp420wlan/Config.in
> @@ -0,0 +1,13 @@
> +config BR2_PACKAGE_UCCP420WLAN
> + bool "uccp420wlan"
> + depends on BR2_LINUX_KERNEL
> + help
> + SoftMAC (mac80211) based WiFi driver for Imagination's Explorer RPU uccp420.
> + This supports Dual Band WiFi with 2.4GHz - 2x2 b/g/n 40MHz, 5GHz - 2x2 a/n/11ac 80MHz modes
Help text should be indented at 72 columns, where the tab counts as 8 (so 62
actual characters).
> +
> + Used in creator ci40 board.
> +
> + https://github.com/CreatorDev/uccp420wlan
> +
> +comment "uccp420wlan needs a Linux kernel to be built"
> + depends on !BR2_LINUX_KERNEL
> diff --git a/package/uccp420wlan/uccp420wlan.hash b/package/uccp420wlan/uccp420wlan.hash
> new file mode 100644
> index 0000000..9e54f21
> --- /dev/null
> +++ b/package/uccp420wlan/uccp420wlan.hash
> @@ -0,0 +1,2 @@
> +# locally computed hash
> +sha256 c5b1194cb9fae049169b261548eaf18d87afce1c7388f7a0366bb5dd2a56cdb2 uccp420wlan-v6.9.tar.gz
> diff --git a/package/uccp420wlan/uccp420wlan.mk b/package/uccp420wlan/uccp420wlan.mk
> new file mode 100644
> index 0000000..f3c8064
> --- /dev/null
> +++ b/package/uccp420wlan/uccp420wlan.mk
> @@ -0,0 +1,20 @@
> +################################################################################
> +#
> +# uccp420wlan
> +#
> +################################################################################
> +
> +UCCP420WLAN_VERSION = v6.9
> +UCCP420WLAN_SITE = $(call github,CreatorDev,uccp420wlan,$(UCCP420WLAN_VERSION))
> +UCCP420WLAN_LICENSE = GPLv2 (kernel module), proprietary (firmware blob)
This is annoying. Proprietary means that no license is given here. So basically
we're not allowed to use it. I suppose you're fairly close to upstream, is there
a chance to get an actual license text for the firmware blob so people can
determine if they're allowed to use it or not?
> +UCCP420WLAN_LICENSE_FILES = COPYING
For the record: the COPYING file only has GPLv2 + Linus explanation. There is
no license text for the firmware blob.
Regards,
Arnout
> +
> +define UCCP420WLAN_INSTALL_FIRMWARE
> + mkdir -p $(TARGET_DIR)/lib/firmware/img/uccp420wlan
> + cp $(@D)/firmware/*.ldr $(TARGET_DIR)/lib/firmware/img/uccp420wlan
> +endef
> +
> +UCCP420WLAN_POST_INSTALL_TARGET_HOOKS += UCCP420WLAN_INSTALL_FIRMWARE
> +
> +$(eval $(kernel-module))
> +$(eval $(generic-package))
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2 2/2] Add defconfig for MIPS Creator ci40
2017-02-15 7:33 ` [Buildroot] [PATCH v2 2/2] Add defconfig for MIPS Creator ci40 Abhimanyu V
@ 2017-02-16 21:57 ` Arnout Vandecappelle
2017-02-17 7:05 ` Abhimanyu V
0 siblings, 1 reply; 8+ messages in thread
From: Arnout Vandecappelle @ 2017-02-16 21:57 UTC (permalink / raw)
To: buildroot
On 15-02-17 08:33, Abhimanyu V wrote:
> From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
>
> Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
> Reviewed-by: Rahul Bedarkar <Rahul.Bedarkar@imgtec.com>
> ---
> Changes v1 -> v2
> - No change
>
> board/ci40/readme.txt | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
> configs/ci40_defconfig | 27 +++++++++++++++++++++++++++
> 2 files changed, 76 insertions(+)
> create mode 100644 board/ci40/readme.txt
> create mode 100644 configs/ci40_defconfig
>
> diff --git a/board/ci40/readme.txt b/board/ci40/readme.txt
> new file mode 100644
> index 0000000..8ce7ed8
> --- /dev/null
> +++ b/board/ci40/readme.txt
> @@ -0,0 +1,49 @@
> +*********************
> +* MIPS Creator CI40 *
> +*********************
> +
> +The 'ci40_defconfig' will create a root filesystem and a kernel image
> +under the 'output/images/' directory. This document will try to explain how
> +to use them in order to run Buildroot in the MIPS Creator CI40 board.
> +
> +The current bootloader by default boot fitImage, so we would need to create
^^^^boots a fitImage
> +command to be able to boot from uImage. Assuming you are at the U-Boot prompt
> +of the MIPS Creator CI40, you can use following way to boot.
Why don't you just create a FIT image instead of a legacy uImage? It's a bit
more involved but not that difficult, is it?
Alternatively, it would be convenient to patch the default U-Boot environment
to boot a uImage, from SD or USB.
> +
> +Booting from network (nfsboot)
> +------------------------------
> + pistachio # setenv netboot_legacy 'sf probe 1:0;mtdparts default;setenv bootargs $console $earlycon $netroot nfsroot=$serverip:$rootpath $bootextra $mtdparts;dhcp $loadaddr $legacy_bootfile; dhcp $fdtaddr $fdtfile;'
> +
> + pistachio # run netboot_legacy
> +
> + It will set variable to boot from tftp server and uses nfsroot
> +
> +Booting from USB/MMC
> +--------------------
> +Extract the generated root filesystem, uImage and dtb file into a USB drive
> +or SD-Card. Here you have the instructions to boot from the two of them.
It would be a lot more convenient if you would create either of these images
with genimage.
> +You have to choose the one your prefer:
> +
> +From USB
> + pistachio # setenv usbboot_legacy 'sf probe 1:0;mtdparts default;setenv bootargs $console $earlycon $usbroot $bootextra $mtdparts;usb start;ext4load usb $usbdev $fdtaddr $bootdir$fdtfile;ext4load usb $usbdev $loadaddr $bootdir$legacy_bootfile;'
> +
> + pistachio # run usbboot_legacy
> +
> +From SD-Card
> + pistachio # setenv mmcboot_legacy 'sf probe 1:0;mtdparts default;setenv bootargs $console $earlycon $mmcroot $bootextra $mtdparts;setenv verify n;mmcinfo; mmc dev $mmcdev;ext4load mmc $mmcdev $fdtaddr $bootdir$fdtfile;ext4load mmc $mmcdev $loadaddr $bootdir$legacy_bootfile;'
> +
> + pistachio # run mmcboot_legacy
> +
> +Finally boot from the loaded file:
> +
> + pistachio # bootm $loadaddr - $fdtaddr;
The instructions don't mention what to do with the U-Boot binary that was
generated by the defconfig. It's a bit useless to build U-Boot if you then don't
use it.
> +
> +
> +Online docs
> +-----------
> +mostly for openwrt but it also applicable on buildroot
> +https://docs.creatordev.io/ci40/guides/openwrt-platform/#overview
> +
> +Prebuilt uboot
> +--------------
> +http://downloads.creatordev.io/?q=u-boot/
> diff --git a/configs/ci40_defconfig b/configs/ci40_defconfig
> new file mode 100644
> index 0000000..5363347
> --- /dev/null
> +++ b/configs/ci40_defconfig
> @@ -0,0 +1,27 @@
> +BR2_mipsel=y
> +BR2_mips_32r2=y
> +# BR2_MIPS_SOFT_FLOAT is not set
> +BR2_TOOLCHAIN_EXTERNAL=y
> +BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS=y
We normally use uClibc toolchains, unless when there is a *very* good reason
not to. We *never* use external toolchains in the defconfigs.
> +BR2_TARGET_GENERIC_HOSTNAME="Ci40"
> +BR2_TARGET_GENERIC_ISSUE="Welcome to Ci40"
> +BR2_TARGET_GENERIC_GETTY_PORT="ttyS1"
> +BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
Since the bootargs you set in the instructions above include a setting of a
console, this shouldn't be needed, the default /dev/console should work.
> +BR2_SYSTEM_DHCP="eth0"
> +BR2_ENABLE_LOCALE_WHITELIST="C en_US en_GB"
We normally don't change the default for this.
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_GIT=y
> +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/CreatorDev/linux.git"
> +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="2319a2476a2bc0c582a9811cd45a6fa3c0beba37"
You can use a custom tarball and $(github-helper). Much more efficient to download.
Admittedly, we currently don't use github-helper anywhere in the defconfigs,
but we probably should.
> +BR2_LINUX_KERNEL_DEFCONFIG="pistachio"
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="img/pistachio_marduk"
> +BR2_PACKAGE_LINUX_FIRMWARE=y
If you don't select any firmware blob, then this package does nothing. Or am I
missing something?
> +BR2_PACKAGE_UCCP420WLAN=y
If you include a Wifi driver/firmware, it makes sense to also include the
minimal toolset to use it. See e.g. imx6ulpico_defconfig.
BTW, it's also nice to insert comment lines like in that defconfig.
Regards,
Arnout
> +BR2_TARGET_UBOOT=y
> +BR2_TARGET_UBOOT_BOARDNAME="pistachio_marduk"
> +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
> +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/CreatorDev/u-boot/archive/v1.0.4.tar.gz"
> +# BR2_TARGET_UBOOT_FORMAT_BIN is not set
> +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
> +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-pistachio_marduk-2015.10-v1.0.4.img"
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2 1/2] uccp420wlan: new package
2017-02-16 21:34 ` [Buildroot] [PATCH v2 1/2] uccp420wlan: new package Arnout Vandecappelle
@ 2017-02-17 6:44 ` Abhimanyu V
0 siblings, 0 replies; 8+ messages in thread
From: Abhimanyu V @ 2017-02-17 6:44 UTC (permalink / raw)
To: buildroot
Thanks Arnout!
On Friday 17 February 2017 03:04 AM, Arnout Vandecappelle wrote:
>
> On 15-02-17 08:33, Abhimanyu V wrote:
>> From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
>>
>> Wifi kernel module and firmware for Imagination explorer RPU
>>
>> Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
>> Reviewed-by: Rahul Bedarkar <Rahul.Bedarkar@imgtec.com>
> [snip]
>
>> diff --git a/package/uccp420wlan/0001-fix-compilation-error-with-kernel-4.4.patch b/package/uccp420wlan/0001-fix-compilation-error-with-kernel-4.4.patch
>> new file mode 100644
>> index 0000000..43026b8
>> --- /dev/null
>> +++ b/package/uccp420wlan/0001-fix-compilation-error-with-kernel-4.4.patch
>> @@ -0,0 +1,90 @@
>> +commit b5f449a2c48d2fe7c9341b32fea5a62dd6699e38
>> +Author: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
>> +Date: Mon Jan 2 16:15:22 2017 +0530
>> +
>> + Fix compilation error with kernel 4.4
>> +
>> + Revert "Fix errors/warnings while compiling against kmod-mac80211"
>> +
>> + This reverts commit e62baef655898526c69250bc63723241f3f4c46d.
> Is this patch submitted upstream? Or if it is not for upstream, please specify
> why not.
I have been speaking to team maintaining the repo and they agreed that
this patch should not be part of this repo, i have posted pull request
for the same.
This repo was mostly used with openwrt till now so the reason for this
patch.
>> +
>> + Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
> [snip]
>> diff --git a/package/uccp420wlan/Config.in b/package/uccp420wlan/Config.in
>> new file mode 100644
>> index 0000000..8f0df12
>> --- /dev/null
>> +++ b/package/uccp420wlan/Config.in
>> @@ -0,0 +1,13 @@
>> +config BR2_PACKAGE_UCCP420WLAN
>> + bool "uccp420wlan"
>> + depends on BR2_LINUX_KERNEL
>> + help
>> + SoftMAC (mac80211) based WiFi driver for Imagination's Explorer RPU uccp420.
>> + This supports Dual Band WiFi with 2.4GHz - 2x2 b/g/n 40MHz, 5GHz - 2x2 a/n/11ac 80MHz modes
> Help text should be indented at 72 columns, where the tab counts as 8 (so 62
> actual characters).
Will fix it.
>
>> +
>> + Used in creator ci40 board.
>> +
>> + https://github.com/CreatorDev/uccp420wlan
>> +
>> +comment "uccp420wlan needs a Linux kernel to be built"
>> + depends on !BR2_LINUX_KERNEL
>> diff --git a/package/uccp420wlan/uccp420wlan.hash b/package/uccp420wlan/uccp420wlan.hash
>> new file mode 100644
>> index 0000000..9e54f21
>> --- /dev/null
>> +++ b/package/uccp420wlan/uccp420wlan.hash
>> @@ -0,0 +1,2 @@
>> +# locally computed hash
>> +sha256 c5b1194cb9fae049169b261548eaf18d87afce1c7388f7a0366bb5dd2a56cdb2 uccp420wlan-v6.9.tar.gz
>> diff --git a/package/uccp420wlan/uccp420wlan.mk b/package/uccp420wlan/uccp420wlan.mk
>> new file mode 100644
>> index 0000000..f3c8064
>> --- /dev/null
>> +++ b/package/uccp420wlan/uccp420wlan.mk
>> @@ -0,0 +1,20 @@
>> +################################################################################
>> +#
>> +# uccp420wlan
>> +#
>> +################################################################################
>> +
>> +UCCP420WLAN_VERSION = v6.9
>> +UCCP420WLAN_SITE = $(call github,CreatorDev,uccp420wlan,$(UCCP420WLAN_VERSION))
>> +UCCP420WLAN_LICENSE = GPLv2 (kernel module), proprietary (firmware blob)
> This is annoying. Proprietary means that no license is given here. So basically
> we're not allowed to use it. I suppose you're fairly close to upstream, is there
> a chance to get an actual license text for the firmware blob so people can
> determine if they're allowed to use it or not?
>
>> +UCCP420WLAN_LICENSE_FILES = COPYING
> For the record: the COPYING file only has GPLv2 + Linus explanation. There is
> no license text for the firmware blob.
Yes firmware blob license text got missed when we moved this repo from
internal to github. I have raised PR for the same.
>
> Regards,
> Arnout
>
>> +
>> +define UCCP420WLAN_INSTALL_FIRMWARE
>> + mkdir -p $(TARGET_DIR)/lib/firmware/img/uccp420wlan
>> + cp $(@D)/firmware/*.ldr $(TARGET_DIR)/lib/firmware/img/uccp420wlan
>> +endef
>> +
>> +UCCP420WLAN_POST_INSTALL_TARGET_HOOKS += UCCP420WLAN_INSTALL_FIRMWARE
>> +
>> +$(eval $(kernel-module))
>> +$(eval $(generic-package))
>>
I will wait for new release with the above fixes to post new version of
this patch.
Thanks and Regards,
Abhimanyu V
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2 2/2] Add defconfig for MIPS Creator ci40
2017-02-16 21:57 ` Arnout Vandecappelle
@ 2017-02-17 7:05 ` Abhimanyu V
2017-02-17 7:41 ` Arnout Vandecappelle
0 siblings, 1 reply; 8+ messages in thread
From: Abhimanyu V @ 2017-02-17 7:05 UTC (permalink / raw)
To: buildroot
Thankyou Arnout!
On Friday 17 February 2017 03:27 AM, Arnout Vandecappelle wrote:
>
> On 15-02-17 08:33, Abhimanyu V wrote:
>> From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
>>
>> Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
>> Reviewed-by: Rahul Bedarkar <Rahul.Bedarkar@imgtec.com>
>> ---
>> Changes v1 -> v2
>> - No change
>>
>> board/ci40/readme.txt | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
>> configs/ci40_defconfig | 27 +++++++++++++++++++++++++++
>> 2 files changed, 76 insertions(+)
>> create mode 100644 board/ci40/readme.txt
>> create mode 100644 configs/ci40_defconfig
>>
>> diff --git a/board/ci40/readme.txt b/board/ci40/readme.txt
>> new file mode 100644
>> index 0000000..8ce7ed8
>> --- /dev/null
>> +++ b/board/ci40/readme.txt
>> @@ -0,0 +1,49 @@
>> +*********************
>> +* MIPS Creator CI40 *
>> +*********************
>> +
>> +The 'ci40_defconfig' will create a root filesystem and a kernel image
>> +under the 'output/images/' directory. This document will try to explain how
>> +to use them in order to run Buildroot in the MIPS Creator CI40 board.
>> +
>> +The current bootloader by default boot fitImage, so we would need to create
> ^^^^boots a fitImage
>
>> +command to be able to boot from uImage. Assuming you are at the U-Boot prompt
>> +of the MIPS Creator CI40, you can use following way to boot.
> Why don't you just create a FIT image instead of a legacy uImage? It's a bit
> more involved but not that difficult, is it?
>
> Alternatively, it would be convenient to patch the default U-Boot environment
> to boot a uImage, from SD or USB.
I had expected fitImage will take some time which i started working on
after posting the patch. I have it ready now so I will post the new
version with the changes. I have kept uImage boot just in case people
would like to use it. Patching uboot is an option but since we not going
to support uImage, i think it is not worth. This can be kept as just for
information?
>> +
>> +Booting from network (nfsboot)
>> +------------------------------
>> + pistachio # setenv netboot_legacy 'sf probe 1:0;mtdparts default;setenv bootargs $console $earlycon $netroot nfsroot=$serverip:$rootpath $bootextra $mtdparts;dhcp $loadaddr $legacy_bootfile; dhcp $fdtaddr $fdtfile;'
>> +
>> + pistachio # run netboot_legacy
>> +
>> + It will set variable to boot from tftp server and uses nfsroot
>> +
>> +Booting from USB/MMC
>> +--------------------
>> +Extract the generated root filesystem, uImage and dtb file into a USB drive
>> +or SD-Card. Here you have the instructions to boot from the two of them.
> It would be a lot more convenient if you would create either of these images
> with genimage.
Thanks, i didnt know about genimage. i will have look at it.
>> +You have to choose the one your prefer:
>> +
>> +From USB
>> + pistachio # setenv usbboot_legacy 'sf probe 1:0;mtdparts default;setenv bootargs $console $earlycon $usbroot $bootextra $mtdparts;usb start;ext4load usb $usbdev $fdtaddr $bootdir$fdtfile;ext4load usb $usbdev $loadaddr $bootdir$legacy_bootfile;'
>> +
>> + pistachio # run usbboot_legacy
>> +
>> +From SD-Card
>> + pistachio # setenv mmcboot_legacy 'sf probe 1:0;mtdparts default;setenv bootargs $console $earlycon $mmcroot $bootextra $mtdparts;setenv verify n;mmcinfo; mmc dev $mmcdev;ext4load mmc $mmcdev $fdtaddr $bootdir$fdtfile;ext4load mmc $mmcdev $loadaddr $bootdir$legacy_bootfile;'
>> +
>> + pistachio # run mmcboot_legacy
>> +
>> +Finally boot from the loaded file:
>> +
>> + pistachio # bootm $loadaddr - $fdtaddr;
>
> The instructions don't mention what to do with the U-Boot binary that was
> generated by the defconfig. It's a bit useless to build U-Boot if you then don't
> use it.
legacy_bootfile env variable actually points to uImage, so it is being
used but not clear, i can explicitly setenc legacy_bootfile to uImage to
show it.
>> +
>> +
>> +Online docs
>> +-----------
>> +mostly for openwrt but it also applicable on buildroot
>> +https://docs.creatordev.io/ci40/guides/openwrt-platform/#overview
>> +
>> +Prebuilt uboot
>> +--------------
>> +http://downloads.creatordev.io/?q=u-boot/
>> diff --git a/configs/ci40_defconfig b/configs/ci40_defconfig
>> new file mode 100644
>> index 0000000..5363347
>> --- /dev/null
>> +++ b/configs/ci40_defconfig
>> @@ -0,0 +1,27 @@
>> +BR2_mipsel=y
>> +BR2_mips_32r2=y
>> +# BR2_MIPS_SOFT_FLOAT is not set
>> +BR2_TOOLCHAIN_EXTERNAL=y
>> +BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS=y
> We normally use uClibc toolchains, unless when there is a *very* good reason
> not to. We *never* use external toolchains in the defconfigs.
I have not tested with uClibc toolchain, so will build and test it
before commenting.
>> +BR2_TARGET_GENERIC_HOSTNAME="Ci40"
>> +BR2_TARGET_GENERIC_ISSUE="Welcome to Ci40"
>> +BR2_TARGET_GENERIC_GETTY_PORT="ttyS1"
>> +BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
> Since the bootargs you set in the instructions above include a setting of a
> console, this shouldn't be needed, the default /dev/console should work.
Thanks, Will fix it.
>
>> +BR2_SYSTEM_DHCP="eth0"
>> +BR2_ENABLE_LOCALE_WHITELIST="C en_US en_GB"
> We normally don't change the default for this.
Thanks
>> +BR2_LINUX_KERNEL=y
>> +BR2_LINUX_KERNEL_CUSTOM_GIT=y
>> +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/CreatorDev/linux.git"
>> +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="2319a2476a2bc0c582a9811cd45a6fa3c0beba37"
> You can use a custom tarball and $(github-helper). Much more efficient to download.
>
> Admittedly, we currently don't use github-helper anywhere in the defconfigs,
> but we probably should.
>
Will try github-helper.
>> +BR2_LINUX_KERNEL_DEFCONFIG="pistachio"
>> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
>> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="img/pistachio_marduk"
>> +BR2_PACKAGE_LINUX_FIRMWARE=y
> If you don't select any firmware blob, then this package does nothing. Or am I
> missing something?
Ah yes this is redundant now, i will remove it.
>> +BR2_PACKAGE_UCCP420WLAN=y
> If you include a Wifi driver/firmware, it makes sense to also include the
> minimal toolset to use it. See e.g. imx6ulpico_defconfig.
>
> BTW, it's also nice to insert comment lines like in that defconfig.
Sure, thanks for pointer.
> Regards,
> Arnout
>
>> +BR2_TARGET_UBOOT=y
>> +BR2_TARGET_UBOOT_BOARDNAME="pistachio_marduk"
>> +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
>> +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/CreatorDev/u-boot/archive/v1.0.4.tar.gz"
>> +# BR2_TARGET_UBOOT_FORMAT_BIN is not set
>> +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
>> +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-pistachio_marduk-2015.10-v1.0.4.img"
>>
Thanks and Regards
Abhimanyu V
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2 2/2] Add defconfig for MIPS Creator ci40
2017-02-17 7:05 ` Abhimanyu V
@ 2017-02-17 7:41 ` Arnout Vandecappelle
2017-02-17 7:44 ` Abhimanyu V
0 siblings, 1 reply; 8+ messages in thread
From: Arnout Vandecappelle @ 2017-02-17 7:41 UTC (permalink / raw)
To: buildroot
On 17-02-17 08:05, Abhimanyu V wrote:
>> The instructions don't mention what to do with the U-Boot binary that was
>> generated by the defconfig. It's a bit useless to build U-Boot if you then don't
>> use it.
> legacy_bootfile env variable actually points to uImage, so it is being
> used but not clear, i can explicitly setenc legacy_bootfile to uImage to
> show it.
I mean that you're not using U-Boot itself. The defconfig builds U-Boot, but
the instructions in the readme only explain how to use the kernel and rootfs.
They assume that you're using the U-Boot in flash.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2 2/2] Add defconfig for MIPS Creator ci40
2017-02-17 7:41 ` Arnout Vandecappelle
@ 2017-02-17 7:44 ` Abhimanyu V
0 siblings, 0 replies; 8+ messages in thread
From: Abhimanyu V @ 2017-02-17 7:44 UTC (permalink / raw)
To: buildroot
On Friday 17 February 2017 01:11 PM, Arnout Vandecappelle wrote:
>
> On 17-02-17 08:05, Abhimanyu V wrote:
>>> The instructions don't mention what to do with the U-Boot binary that was
>>> generated by the defconfig. It's a bit useless to build U-Boot if you then don't
>>> use it.
>> legacy_bootfile env variable actually points to uImage, so it is being
>> used but not clear, i can explicitly setenc legacy_bootfile to uImage to
>> show it.
> I mean that you're not using U-Boot itself. The defconfig builds U-Boot, but
> the instructions in the readme only explain how to use the kernel and rootfs.
> They assume that you're using the U-Boot in flash.
Ok got it, i will have section explaining new u-boot binary flashing.
>
> Regards,
> Arnout
Regards
Abhimanyu V
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-02-17 7:44 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 7:33 [Buildroot] [PATCH v2 1/2] uccp420wlan: new package Abhimanyu V
2017-02-15 7:33 ` [Buildroot] [PATCH v2 2/2] Add defconfig for MIPS Creator ci40 Abhimanyu V
2017-02-16 21:57 ` Arnout Vandecappelle
2017-02-17 7:05 ` Abhimanyu V
2017-02-17 7:41 ` Arnout Vandecappelle
2017-02-17 7:44 ` Abhimanyu V
2017-02-16 21:34 ` [Buildroot] [PATCH v2 1/2] uccp420wlan: new package Arnout Vandecappelle
2017-02-17 6:44 ` Abhimanyu V
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.