* [meta-processor-sdk][PATCH] tiovx-app-host: patch for makefiles is pushed to sources
From: Djordje Senicic @ 2018-07-23 23:52 UTC (permalink / raw)
To: meta-arago; +Cc: d-senicic1, Djordje Senicic
* Add /lib to library search path
Signed-off-by: Djordje Senicic <x0157990@ti.com>
---
recipes-ti/tiovx/files/hack-to-add-lib-path.patch | 28 -----------------------
recipes-ti/tiovx/tiovx-app-host.bb | 1 -
recipes-ti/tiovx/tiovx-sys.inc | 2 +-
3 files changed, 1 insertion(+), 30 deletions(-)
delete mode 100644 recipes-ti/tiovx/files/hack-to-add-lib-path.patch
diff --git a/recipes-ti/tiovx/files/hack-to-add-lib-path.patch b/recipes-ti/tiovx/files/hack-to-add-lib-path.patch
deleted file mode 100644
index 8223a11..0000000
--- a/recipes-ti/tiovx/files/hack-to-add-lib-path.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/host/makefile b/host/makefile
-index 469aeb0..295deda 100644
---- a/host/makefile
-+++ b/host/makefile
-@@ -102,7 +102,8 @@ CPPFLAGS =
- LDFLAGS = -L$(IPC_INSTALL_DIR)/linux/src/api/.libs/ \
- -L$(IPC_INSTALL_DIR)/linux/src/utils/.libs \
- -L$(IPC_INSTALL_DIR)/linux/src/transport/.libs \
-- -L$(TARGET_INSTALL_DIR)/usr/lib
-+ -L$(TARGET_INSTALL_DIR)/usr/lib \
-+ -L$(TARGET_INSTALL_DIR)/lib
-
- else
- LD = $(CC)
-diff --git a/khronos_example/makefile b/khronos_example/makefile
-index a54aa33..1e9a75f 100644
---- a/khronos_example/makefile
-+++ b/khronos_example/makefile
-@@ -101,7 +101,8 @@ CPPFLAGS =
- LDFLAGS = -L$(IPC_INSTALL_DIR)/linux/src/api/.libs/ \
- -L$(IPC_INSTALL_DIR)/linux/src/utils/.libs \
- -L$(IPC_INSTALL_DIR)/linux/src/transport/.libs \
-- -L$(TARGET_INSTALL_DIR)/usr/lib
-+ -L$(TARGET_INSTALL_DIR)/usr/lib \
-+ -L$(TARGET_INSTALL_DIR)/lib
-
- else
- LD = $(CC)
diff --git a/recipes-ti/tiovx/tiovx-app-host.bb b/recipes-ti/tiovx/tiovx-app-host.bb
index a5c29ab..097f045 100644
--- a/recipes-ti/tiovx/tiovx-app-host.bb
+++ b/recipes-ti/tiovx/tiovx-app-host.bb
@@ -8,7 +8,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append += "\
file://setenv.sh \
- file://hack-to-add-lib-path.patch \
"
require recipes-ti/includes/tisdk-paths.inc
diff --git a/recipes-ti/tiovx/tiovx-sys.inc b/recipes-ti/tiovx/tiovx-sys.inc
index e45f130..56b4385 100644
--- a/recipes-ti/tiovx/tiovx-sys.inc
+++ b/recipes-ti/tiovx/tiovx-sys.inc
@@ -1,5 +1,5 @@
PV = "01.00.01.00"
BRANCH="master"
-SRCREV = "dc60c253a218fb3ec92fdeeaa454fce047f8964a"
+SRCREV = "b44eece0a22b97de59c964acb2a910fc56cdf3ac"
SRC_URI = "git://git.ti.com/processor-sdk/tiovx-app.git;protocol=git;branch=${BRANCH}"
--
1.9.1
^ permalink raw reply related
* [Intel-wired-lan] [PATCH 13/13] ice: Introduce SERVICE_DIS flag and service routine functions
From: Abodunrin, Akeem G @ 2018-07-23 23:51 UTC (permalink / raw)
To: intel-wired-lan
In-Reply-To: <20180723231348.14838-14-anirudh.venkataramanan@intel.com>
ACK
> -----Original Message-----
> From: Venkataramanan, Anirudh
> Sent: Monday, July 23, 2018 4:14 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Abodunrin, Akeem G <akeem.g.abodunrin@intel.com>
> Subject: [PATCH 13/13] ice: Introduce SERVICE_DIS flag and service routine
> functions
>
> From: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
>
> This patch introduces SERVICE_DIS flag to use for stopping service task.
> This flag will be checked before scheduling new tasks. Also add new functions
> ice_service_task_stop to stop service task.
>
> Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice.h | 1 +
> drivers/net/ethernet/intel/ice/ice_main.c | 34 ++++++++++++++++++++++++----
> ---
> 2 files changed, 28 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice.h
> b/drivers/net/ethernet/intel/ice/ice.h
> index 6f44a850c4b2..9cf233d085d8 100644
> --- a/drivers/net/ethernet/intel/ice/ice.h
> +++ b/drivers/net/ethernet/intel/ice/ice.h
> @@ -138,6 +138,7 @@ enum ice_state {
> __ICE_FLTR_OVERFLOW_PROMISC,
> __ICE_CFG_BUSY,
> __ICE_SERVICE_SCHED,
> + __ICE_SERVICE_DIS,
> __ICE_STATE_NBITS /* must be last */
> };
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c
> b/drivers/net/ethernet/intel/ice/ice_main.c
> index cb1145515f98..3a77812e4be7 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -1107,7 +1107,7 @@ static void ice_clean_adminq_subtask(struct ice_pf
> *pf)
> */
> static void ice_service_task_schedule(struct ice_pf *pf) {
> - if (!test_bit(__ICE_DOWN, pf->state) &&
> + if (!test_bit(__ICE_SERVICE_DIS, pf->state) &&
> !test_and_set_bit(__ICE_SERVICE_SCHED, pf->state) &&
> !test_bit(__ICE_NEEDS_RESTART, pf->state))
> queue_work(ice_wq, &pf->serv_task);
> @@ -1126,6 +1126,22 @@ static void ice_service_task_complete(struct ice_pf
> *pf)
> clear_bit(__ICE_SERVICE_SCHED, pf->state); }
>
> +/**
> + * ice_service_task_stop - stop service task and cancel works
> + * @pf: board private structure
> + */
> +static void ice_service_task_stop(struct ice_pf *pf) {
> + set_bit(__ICE_SERVICE_DIS, pf->state);
> +
> + if (pf->serv_tmr.function)
> + del_timer_sync(&pf->serv_tmr);
> + if (pf->serv_task.func)
> + cancel_work_sync(&pf->serv_task);
> +
> + clear_bit(__ICE_SERVICE_SCHED, pf->state); }
> +
> /**
> * ice_service_timer - timer callback to schedule service task
> * @t: pointer to timer_list
> @@ -3391,10 +3407,7 @@ static void ice_determine_q_usage(struct ice_pf *pf)
> */
> static void ice_deinit_pf(struct ice_pf *pf) {
> - if (pf->serv_tmr.function)
> - del_timer_sync(&pf->serv_tmr);
> - if (pf->serv_task.func)
> - cancel_work_sync(&pf->serv_task);
> + ice_service_task_stop(pf);
> mutex_destroy(&pf->sw_mutex);
> mutex_destroy(&pf->avail_q_mutex);
> }
> @@ -3601,6 +3614,8 @@ static int ice_probe(struct pci_dev *pdev,
> pf->pdev = pdev;
> pci_set_drvdata(pdev, pf);
> set_bit(__ICE_DOWN, pf->state);
> + /* Disable service task until DOWN bit is cleared */
> + set_bit(__ICE_SERVICE_DIS, pf->state);
>
> hw = &pf->hw;
> hw->hw_addr = pcim_iomap_table(pdev)[ICE_BAR0]; @@ -3658,6
> +3673,9 @@ static int ice_probe(struct pci_dev *pdev,
> goto err_init_interrupt_unroll;
> }
>
> + /* Driver is mostly up */
> + clear_bit(__ICE_DOWN, pf->state);
> +
> /* In case of MSIX we are going to setup the misc vector right here
> * to handle admin queue events etc. In case of legacy and MSI
> * the misc functionality and queue processing is combined in @@ -
> 3697,8 +3715,7 @@ static int ice_probe(struct pci_dev *pdev,
> goto err_alloc_sw_unroll;
> }
>
> - /* Driver is mostly up */
> - clear_bit(__ICE_DOWN, pf->state);
> + clear_bit(__ICE_SERVICE_DIS, pf->state);
>
> /* since everything is good, start the service timer */
> mod_timer(&pf->serv_tmr, round_jiffies(jiffies + pf->serv_tmr_period));
> @@ -3712,6 +3729,7 @@ static int ice_probe(struct pci_dev *pdev,
> return 0;
>
> err_alloc_sw_unroll:
> + set_bit(__ICE_SERVICE_DIS, pf->state);
> set_bit(__ICE_DOWN, pf->state);
> devm_kfree(&pf->pdev->dev, pf->first_sw);
> err_msix_misc_unroll:
> @@ -3739,6 +3757,7 @@ static void ice_remove(struct pci_dev *pdev)
> return;
>
> set_bit(__ICE_DOWN, pf->state);
> + ice_service_task_stop(pf);
>
> ice_vsi_release_all(pf);
> ice_free_irq_msix_misc(pf);
> @@ -6003,6 +6022,7 @@ static void ice_tx_timeout(struct net_device *netdev)
> netdev_err(netdev, "tx_timeout recovery unsuccessful, device is
> in unrecoverable state.\n");
> set_bit(__ICE_DOWN, pf->state);
> set_bit(__ICE_NEEDS_RESTART, vsi->state);
> + set_bit(__ICE_SERVICE_DIS, pf->state);
> break;
> }
>
> --
> 2.14.3
^ permalink raw reply
* [U-Boot] [PATCH v1 6/6] mmc: arm_pl180_mmci: Add "cd_inverted" DT property read
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532072657-2541-7-git-send-email-patrice.chotard@st.com>
On 20 July 2018 at 01:44, Patrice Chotard <patrice.chotard@st.com> wrote:
> Add missing read of "cd_inverted" property in DT.
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
>
> drivers/mmc/arm_pl180_mmci.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply
* [U-Boot] [PATCH v1 5/6] mmc: arm_pl180_mmci: Add missing clk_free
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532072657-2541-6-git-send-email-patrice.chotard@st.com>
On 20 July 2018 at 01:44, Patrice Chotard <patrice.chotard@st.com> wrote:
> Add missing clk_free() call in case of failure
> when enabling the clock.
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
>
> drivers/mmc/arm_pl180_mmci.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply
* [U-Boot] [PATCH v1 4/6] mmc: arm_pl180_mmci: Update to support CONFIG_BLK
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532072657-2541-5-git-send-email-patrice.chotard@st.com>
Hi Patrice,
On 20 July 2018 at 01:44, Patrice Chotard <patrice.chotard@st.com> wrote:
> Config flag CONFIG_BLK becomes mandatory, update arm_pl180_mmci
> to support this config.
>
> This driver is used by STM32Fx and by Vexpress platforms.
> Only STM32Fx are DM ready. No DM code is isolated and will be
> removed easily when wexpress will be converted to DM.
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
>
> drivers/mmc/arm_pl180_mmci.c | 85 +++++++++++++++++++++++---------------------
> 1 file changed, 45 insertions(+), 40 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
But please see below.
>
> diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
> index e267cd782e8b..e988bac62298 100644
> --- a/drivers/mmc/arm_pl180_mmci.c
> +++ b/drivers/mmc/arm_pl180_mmci.c
> @@ -357,13 +357,13 @@ static const struct mmc_ops arm_pl180_mmci_ops = {
> .set_ios = host_set_ios,
> .init = mmc_host_reset,
> };
> -#endif
>
> /*
> * mmc_host_init - initialize the mmc controller.
> * Set initial clock and power for mmc slot.
> * Initialize mmc struct and register with mmc framework.
> */
> +
> int arm_pl180_mmci_init(struct pl180_mmc_host *host, struct mmc **mmc)
> {
> u32 sdi_u32;
> @@ -377,9 +377,8 @@ int arm_pl180_mmci_init(struct pl180_mmc_host *host, struct mmc **mmc)
> writel(sdi_u32, &host->base->mask0);
>
> host->cfg.name = host->name;
> -#ifndef CONFIG_DM_MMC
> host->cfg.ops = &arm_pl180_mmci_ops;
> -#endif
> +
> /* TODO remove the duplicates */
> host->cfg.host_caps = host->caps;
> host->cfg.voltages = host->voltages;
> @@ -393,23 +392,44 @@ int arm_pl180_mmci_init(struct pl180_mmc_host *host, struct mmc **mmc)
> *mmc = mmc_create(&host->cfg, host);
> if (!*mmc)
> return -1;
> -
> debug("registered mmc interface number is:%d\n",
> (*mmc)->block_dev.devnum);
>
> return 0;
> }
> +#endif
>
> #ifdef CONFIG_DM_MMC
Can you drop this?
> +static void arm_pl180_mmc_init(struct pl180_mmc_host *host)
> +{
> + u32 sdi_u32;
> +
> + writel(host->pwr_init, &host->base->power);
> + writel(host->clkdiv_init, &host->base->clock);
> + udelay(CLK_CHANGE_DELAY);
> +
> + /* Disable mmc interrupts */
> + sdi_u32 = readl(&host->base->mask0) & ~SDI_MASK0_MASK;
> + writel(sdi_u32, &host->base->mask0);
> +}
> +
> static int arm_pl180_mmc_probe(struct udevice *dev)
> {
> struct arm_pl180_mmc_plat *pdata = dev_get_platdata(dev);
> struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
> struct mmc *mmc = &pdata->mmc;
> - struct pl180_mmc_host *host = mmc->priv;
> + struct pl180_mmc_host *host = dev->priv;
> + struct mmc_config *cfg = &pdata->cfg;
> struct clk clk;
> u32 bus_width;
> int ret;
> + fdt_addr_t addr;
> +
> + addr = devfdt_get_addr(dev);
dev_read_addr()
It is somewhat more correct to read from the DT in
ofdata_to_platdata() if you can.
> + if (addr == FDT_ADDR_T_NONE)
> + return -EINVAL;
> +
> + host->base = (void *)addr;
>
> ret = clk_get_by_index(dev, 0, &clk);
> if (ret < 0)
> @@ -421,27 +441,28 @@ static int arm_pl180_mmc_probe(struct udevice *dev)
> return ret;
> }
>
> - strcpy(host->name, "MMC");
> host->pwr_init = INIT_PWR;
> host->clkdiv_init = SDI_CLKCR_CLKDIV_INIT_V1 | SDI_CLKCR_CLKEN |
> SDI_CLKCR_HWFC_EN;
> - host->voltages = VOLTAGE_WINDOW_SD;
> - host->caps = 0;
> host->clock_in = clk_get_rate(&clk);
> - host->clock_min = host->clock_in / (2 * (SDI_CLKCR_CLKDIV_INIT_V1 + 1));
> - host->clock_max = dev_read_u32_default(dev, "max-frequency",
> - MMC_CLOCK_MAX);
> host->version2 = dev_get_driver_data(dev);
>
> + cfg->name = dev->name;
> + cfg->voltages = VOLTAGE_WINDOW_SD;
> + cfg->host_caps = 0;
> + cfg->f_min = host->clock_in / (2 * (SDI_CLKCR_CLKDIV_INIT_V1 + 1));
> + cfg->f_max = dev_read_u32_default(dev, "max-frequency", MMC_CLOCK_MAX);
> + cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
> +
> gpio_request_by_name(dev, "cd-gpios", 0, &host->cd_gpio, GPIOD_IS_IN);
>
> bus_width = dev_read_u32_default(dev, "bus-width", 1);
> switch (bus_width) {
> case 8:
> - host->caps |= MMC_MODE_8BIT;
> + cfg->host_caps |= MMC_MODE_8BIT;
> /* Hosts capable of 8-bit transfers can also do 4 bits */
> case 4:
> - host->caps |= MMC_MODE_4BIT;
> + cfg->host_caps |= MMC_MODE_4BIT;
> break;
> case 1:
> break;
> @@ -449,19 +470,21 @@ static int arm_pl180_mmc_probe(struct udevice *dev)
> dev_err(dev, "Invalid bus-width value %u\n", bus_width);
> }
>
> - ret = arm_pl180_mmci_init(host, &mmc);
> - if (ret) {
> - dev_err(dev, "arm_pl180_mmci init failed\n");
> - return ret;
> - }
> -
> + arm_pl180_mmc_init(host);
> + mmc->priv = host;
> mmc->dev = dev;
> - dev->priv = host;
> upriv->mmc = mmc;
>
> return 0;
> }
>
> +int arm_pl180_mmc_bind(struct udevice *dev)
> +{
> + struct arm_pl180_mmc_plat *plat = dev_get_platdata(dev);
> +
> + return mmc_bind(dev, &plat->mmc, &plat->cfg);
> +}
> +
> static int dm_host_request(struct udevice *dev, struct mmc_cmd *cmd,
> struct mmc_data *data)
> {
> @@ -479,9 +502,7 @@ static int dm_host_set_ios(struct udevice *dev)
>
> static int dm_mmc_getcd(struct udevice *dev)
> {
> - struct arm_pl180_mmc_plat *pdata = dev_get_platdata(dev);
> - struct mmc *mmc = &pdata->mmc;
> - struct pl180_mmc_host *host = mmc->priv;
> + struct pl180_mmc_host *host = dev->priv;
> int value = 1;
>
> if (dm_gpio_is_valid(&host->cd_gpio)) {
> @@ -499,22 +520,6 @@ static const struct dm_mmc_ops arm_pl180_dm_mmc_ops = {
> .get_cd = dm_mmc_getcd,
> };
>
> -static int arm_pl180_mmc_ofdata_to_platdata(struct udevice *dev)
> -{
> - struct arm_pl180_mmc_plat *pdata = dev_get_platdata(dev);
> - struct mmc *mmc = &pdata->mmc;
> - struct pl180_mmc_host *host = mmc->priv;
> - fdt_addr_t addr;
> -
> - addr = devfdt_get_addr(dev);
> - if (addr == FDT_ADDR_T_NONE)
> - return -EINVAL;
> -
> - host->base = (void *)addr;
> -
> - return 0;
> -}
> -
> static const struct udevice_id arm_pl180_mmc_match[] = {
> { .compatible = "st,stm32f4xx-sdio", .data = VERSION1 },
> { /* sentinel */ }
> @@ -526,7 +531,7 @@ U_BOOT_DRIVER(arm_pl180_mmc) = {
> .of_match = arm_pl180_mmc_match,
> .ops = &arm_pl180_dm_mmc_ops,
> .probe = arm_pl180_mmc_probe,
> - .ofdata_to_platdata = arm_pl180_mmc_ofdata_to_platdata,
> + .bind = arm_pl180_mmc_bind,
> .priv_auto_alloc_size = sizeof(struct pl180_mmc_host),
> .platdata_auto_alloc_size = sizeof(struct arm_pl180_mmc_plat),
> };
> --
> 1.9.1
>
Regards,
Simon
^ permalink raw reply
* [U-Boot] [PATCH v1 3/6] configs: stm32f769-disco: Enable CONFIG_BLK
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532072657-2541-4-git-send-email-patrice.chotard@st.com>
On 20 July 2018 at 01:44, Patrice Chotard <patrice.chotard@st.com> wrote:
> CONFIG_BLK config flag becomes mandatory, enable it.
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
>
> configs/stm32f469-discovery_defconfig | 1 -
> 1 file changed, 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply
* [U-Boot] [PATCH v1 2/6] configs: stm32f746-disco: Enable CONFIG_BLK
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532072657-2541-3-git-send-email-patrice.chotard@st.com>
On 20 July 2018 at 01:44, Patrice Chotard <patrice.chotard@st.com> wrote:
> CONFIG_BLK config flag becomes mandatory, enable it.
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
>
> configs/stm32f746-disco_defconfig | 1 -
> 1 file changed, 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply
* [U-Boot] [PATCH v1 1/6] configs: stm32f429-evaluation: Enable CONFIG_BLK
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532072657-2541-2-git-send-email-patrice.chotard@st.com>
On 20 July 2018 at 01:44, Patrice Chotard <patrice.chotard@st.com> wrote:
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
>
> configs/stm32f429-evaluation_defconfig | 1 -
> 1 file changed, 1 deletion(-)
>
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply
* [U-Boot] [RFC PATCH v2 3/6] dm: usb: Add UCLASS_USB_DEV_GENERIC shutdown
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <20180720071401.12952-4-jagan@amarulasolutions.com>
Hi Jagan,
On 20 July 2018 at 01:13, Jagan Teki <jagan@amarulasolutions.com> wrote:
> Some OTG controllers which operates on Peripheral
> mode are registered as UCLASS_USB_DEV_GENERIC.
>
> So add support to shutdown them as well. shutdown
> happened during 'usb reset' and U-Boot handoff code
> for Linux boot.
>
> controller restarting in 'usb reset' like probing
> again is still missing for this type of UCLASS.
>
> Cc: Simon Glass <sjg@chromium.org>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Note:
> I tried of traversing for multiple UCLASS in removal
> code in usb_stop, but couldn't come with proper solutions.
> I don't think any other area of code need a requirement like
> this, or may be I'm missing. any help would appreciate.
>
> Changes for v2:
> - none
>
> drivers/usb/host/usb-uclass.c | 43 +++++++++++++++++++++++++++++++++++
> 1 file changed, 43 insertions(+)
>
> diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
> index 611ea97a72..99cf3d2b49 100644
> --- a/drivers/usb/host/usb-uclass.c
> +++ b/drivers/usb/host/usb-uclass.c
> @@ -158,6 +158,45 @@ int usb_get_max_xfer_size(struct usb_device *udev, size_t *size)
> return ops->get_max_xfer_size(bus, size);
> }
>
> +int __usb_stop(void)
Why the __ ? I think it should be something like usb_remove_and_unbind_all()
> +{
> + struct udevice *bus;
> + struct udevice *rh;
> + struct uclass *uc;
> + struct usb_uclass_priv *uc_priv;
> + int err = 0, ret;
> +
> + /* De-activate any devices that have been activated */
> + ret = uclass_get(UCLASS_USB_DEV_GENERIC, &uc);
> + if (ret)
> + return ret;
> +
> + uc_priv = uc->priv;
> +
> + uclass_foreach_dev(bus, uc) {
> + ret = device_remove(bus, DM_REMOVE_NORMAL);
> + if (ret && !err)
> + err = ret;
> +
> + /* Locate root hub device */
> + device_find_first_child(bus, &rh);
> + if (rh) {
> + /*
> + * All USB devices are children of root hub.
> + * Unbinding root hub will unbind all of its children.
> + */
> + ret = device_unbind(rh);
> + if (ret && !err)
> + err = ret;
> + }
> + }
> +
> + uc_priv->companion_device_count = 0;
> + usb_started = 0;
> +
> + return err;
> +}
> +
> int usb_stop(void)
> {
> struct udevice *bus;
> @@ -166,6 +205,10 @@ int usb_stop(void)
> struct usb_uclass_priv *uc_priv;
> int err = 0, ret;
>
> + ret = __usb_stop();
> + if (ret)
> + return ret;
> +
This looks like the same code that appears below here, or very
similar. Why is this needed?
> /* De-activate any devices that have been activated */
> ret = uclass_get(UCLASS_USB, &uc);
> if (ret)
> --
> 2.17.1
>
Regards,
Simon
^ permalink raw reply
* [U-Boot] [PATCH 11/20] w1: enumerate sandbox driver if configured
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <20180720160153.18c85f96@jawa>
Hi,
On 20 July 2018 at 08:01, Lukasz Majewski <lukma@denx.de> wrote:
> Hi Eugen,
>
> Thanks for (re-)bringing the One wire support to u-boot.
>
>> Add a sandbox eeprom on the bus as a device, if sandbox driver is
>> configured.
>>
>> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
>> ---
>> drivers/w1/w1-uclass.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c
>> index cfddda3..e58c1ca 100644
>> --- a/drivers/w1/w1-uclass.c
>> +++ b/drivers/w1/w1-uclass.c
>> @@ -142,6 +142,11 @@ static int w1_enumerate(struct udevice *bus)
>> }
>> }
>>
>> +#ifdef CONFIG_W1_EEPROM_SANDBOX
>> + /* before we are finished, add a sandbox device if we can */
>> + w1_new_device(bus, W1_FAMILY_EEP_SANDBOX);
>> +#endif
>
> IMHO we shouldn't mix the sandbox code with production (on boards) code.
>
> Maybe Simon (+CCed) could provide some more input here?
I have not seen this series. But new devices should be created
automatically based on them being in the device tree. So you should
just be able to add them there.
I don't understand what w1_new_device() does. Also, it should return an error.
Regards,
Simon
^ permalink raw reply
* [U-Boot] [PATCH] mkimage: fit_image: Use macros from image.h
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <8047e2ecc83d516b32dd9e6c6ea8a05e64f15500.1532082660.git.michal.simek@xilinx.com>
On 20 July 2018 at 04:31, Michal Simek <michal.simek@xilinx.com> wrote:
> There is no reason not to use macros which are already defined.
> It is also much easier for grepping.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> tools/fit_image.c | 53 +++++++++++++++++++++++++++++------------------------
> 1 file changed, 29 insertions(+), 24 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply
* [U-Boot] [UBOOT PATCH] gpio: zynq: Used platdata structure for storing static data instead of priv
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532077609-20619-1-git-send-email-vipul.kumar@xilinx.com>
On 20 July 2018 at 03:06, Vipul Kumar <vipul.kumar@xilinx.com> wrote:
> This patch used platdata structure instead of priv for storing static
> information read from DT.
>
> Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
> ---
> drivers/gpio/zynq_gpio.c | 67 ++++++++++++++++++++++++------------------------
> 1 file changed, 34 insertions(+), 33 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply
* [U-Boot] [PATCH v2 2/2] disk: part: Don't show redundant error message
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <20180720151856.23458-3-semen.protsenko@linaro.org>
On 20 July 2018 at 09:18, Sam Protsenko <semen.protsenko@linaro.org> wrote:
> Underlying API should already print some meaningful error message, so
> this one is just brings more noise. E.g. we can see log like this:
>
> MMC: no card present
> ** Bad device mmc 0 **
>
> Obviously, second error message is unwanted. Let's only print it in case
> when DEBUG is defined to keep log short and clear.
>
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> ---
> Changes in v2:
> - Instead of removing error message, print it with debug()
>
> disk/part.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply
* [U-Boot] [PATCH 11/17] fs: add mkdir interface
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <ad5d0bb1-1d01-a29d-c37f-79459aa10ad9@gmx.de>
Hi,
On 20 July 2018 at 11:35, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> On 07/20/2018 04:57 AM, AKASHI Takahiro wrote:
>> "mkdir" interface is added to file operations.
>> This is a preparatory change as mkdir support for FAT file system
>> will be added in next patch.
>>
>> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
>> ---
>> fs/fs.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
>> include/fs.h | 10 ++++++++++
>> 2 files changed, 55 insertions(+)
>>
We need to get a proper fs test in place before we add any more stuff.
Does someone waent to try converting fs-test.sh to pytest in test/py/tests ?
Regards,
Simon
^ permalink raw reply
* [U-Boot] [PATCH 5/6] configs: stm32mp15: enable ADC
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532349355-32671-5-git-send-email-fabrice.gasnier@st.com>
On 23 July 2018 at 06:35, Fabrice Gasnier <fabrice.gasnier@st.com> wrote:
> Enable ADC on stm32mp15.
> - CONFIG_CMD_ADC
> - CONFIG_STM32_ADC
>
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
> ---
>
> configs/stm32mp15_basic_defconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply
* [U-Boot] [PATCH 4/6] adc: Add driver for STM32 ADC
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532349355-32671-4-git-send-email-fabrice.gasnier@st.com>
Hi Fabrice,
On 23 July 2018 at 06:35, Fabrice Gasnier <fabrice.gasnier@st.com> wrote:
> This patch adds support for STMicroelectronics STM32 ADC (analog to
> digital converter). It's originally based on Linux kernel v4.18-rcs
> drivers/iio/adc/stm32-adc*. It's composed of:
> - core driver (UCLASS_SIMPLE_BUS) manages common resources (clk, regu).
> - child drivers (UCLASS_ADC) declare each ADC, channels and handle
> conversions.
> This driver currently supports STM32H7 and STM32MP1 ADC.
>
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
> ---
>
> drivers/adc/Kconfig | 16 +++
> drivers/adc/Makefile | 1 +
> drivers/adc/stm32-adc-core.c | 209 +++++++++++++++++++++++++++++++++++
> drivers/adc/stm32-adc-core.h | 51 +++++++++
> drivers/adc/stm32-adc.c | 257 +++++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 534 insertions(+)
> create mode 100644 drivers/adc/stm32-adc-core.c
> create mode 100644 drivers/adc/stm32-adc-core.h
> create mode 100644 drivers/adc/stm32-adc.c
Reviewed-by: Simon Glass <sjg@chromium.org>
I do worry a bit about the code bloat caused by the dev_err() calls.
Don't you want to use debug() instead? Or perhaps log() and
log_msg_ret()?
Regards,
Simon
^ permalink raw reply
* [U-Boot] [PATCH 3/6] dt-bindings: Document STM32 ADC DT bindings
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532349355-32671-3-git-send-email-fabrice.gasnier@st.com>
On 23 July 2018 at 06:35, Fabrice Gasnier <fabrice.gasnier@st.com> wrote:
> This patch adds documentation of device tree bindings for the STM32 ADC.
> It's based on linux-v4.18-rc* dt-bindings, at the time of writing:
> - Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
>
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
> ---
>
> doc/device-tree-bindings/adc/st,stm32-adc.txt | 141 ++++++++++++++++++++++++++
> 1 file changed, 141 insertions(+)
> create mode 100644 doc/device-tree-bindings/adc/st,stm32-adc.txt
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply
* [U-Boot] [PATCH 2/6] dm: adc: uclass: get reference regulator once
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532349355-32671-2-git-send-email-fabrice.gasnier@st.com>
Hi Fabrice,
On 23 July 2018 at 06:35, Fabrice Gasnier <fabrice.gasnier@st.com> wrote:
> device_get_supply_regulator() only needs to be called once.
> But each time there's call to adc_vxx_value() for instance, it calls
> adc_vxx_platdata_update() -> device_get_supply_regulator().
>
> This also allows vdd_supply/vss_supply to be provided directly from
> uc_pdata, e.g dt-binding variant like stm32-adc provide its own
> 'vref-supply'.
>
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
> ---
>
> drivers/adc/adc-uclass.c | 21 +++++++++++++--------
> 1 file changed, 13 insertions(+), 8 deletions(-)
The original code doesn't look right to me.
Reading from the DT should happen in the ofdata_to_platdata() method,
except (as here) where we need to probe another device, iwc we can use
the probe() method.
So can you move this code into a new probe() method, so it just
happens once, when the device is probed?
>
> diff --git a/drivers/adc/adc-uclass.c b/drivers/adc/adc-uclass.c
> index 17c1a4e..70f4cde 100644
> --- a/drivers/adc/adc-uclass.c
> +++ b/drivers/adc/adc-uclass.c
> @@ -264,10 +264,13 @@ static int adc_vdd_platdata_update(struct udevice *dev)
> * will bind before its supply regulator device, then the below 'get'
> * will return an error.
> */
> - ret = device_get_supply_regulator(dev, "vdd-supply",
> - &uc_pdata->vdd_supply);
> - if (ret)
> - return ret;
> + if (!uc_pdata->vdd_supply) {
> + /* Only get vdd_supply once */
> + ret = device_get_supply_regulator(dev, "vdd-supply",
> + &uc_pdata->vdd_supply);
> + if (ret)
> + return ret;
> + }
>
> ret = regulator_get_value(uc_pdata->vdd_supply);
> if (ret < 0)
> @@ -283,10 +286,12 @@ static int adc_vss_platdata_update(struct udevice *dev)
> struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
> int ret;
>
> - ret = device_get_supply_regulator(dev, "vss-supply",
> - &uc_pdata->vss_supply);
> - if (ret)
> - return ret;
> + if (!uc_pdata->vss_supply) {
> + ret = device_get_supply_regulator(dev, "vss-supply",
> + &uc_pdata->vss_supply);
> + if (ret)
> + return ret;
> + }
>
> ret = regulator_get_value(uc_pdata->vss_supply);
> if (ret < 0)
> --
> 1.9.1
>
Regards,
Simon
^ permalink raw reply
* [U-Boot] [PATCH 1/6] clk: add clk_valid()
From: Simon Glass @ 2018-07-23 23:48 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532349355-32671-1-git-send-email-fabrice.gasnier@st.com>
Hi Fabrice,
On 23 July 2018 at 06:35, Fabrice Gasnier <fabrice.gasnier@st.com> wrote:
>
> add clk_valid() to check for optional clocks are valid.
>
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
> ---
>
> include/clk.h | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/include/clk.h b/include/clk.h
> index 9a35764..71679a9 100644
> --- a/include/clk.h
> +++ b/include/clk.h
> @@ -294,4 +294,14 @@ int clk_disable_bulk(struct clk_bulk *bulk);
>
> int soc_clk_dump(void);
>
> +/**
> + * clk_valid() - check if clk is valid
> + *
> + * @clk: the clock to check
> + * @return TRUE if valid, or FALSE
true / false
> + */
> +static inline bool clk_valid(struct clk *clk)
> +{
> + return !!clk->dev;
> +}
> #endif
> --
> 1.9.1
>
Please can you add a call to this from test/dm/clk.c ?
Regards,
Simon
^ permalink raw reply
* [U-Boot] [PATCH v2 5/5] sandbox: led: use new function to configure default state
From: Simon Glass @ 2018-07-23 23:47 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532338891-6848-6-git-send-email-patrick.delaunay@st.com>
Hi Patrick,
On 23 July 2018 at 03:41, Patrick Delaunay <patrick.delaunay@st.com> wrote:
> Initialize the led with the default state defined in device tree
> in board_init and solve issue with test for led default state.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
> Led default-state is correctly handle in Sandbox, tested with:
> ./u-boot -d ./arch/sandbox/dts/test.dtb
> => led list
> sandbox:red <inactive>
> sandbox:green <inactive>
> sandbox:default_on on
> sandbox:default_off off
>
> This patch solve "make tests" issue introduced by
> http://patchwork.ozlabs.org/patch/943651/
>
> Changes in v2:
> - add sandbox impact and test update
>
> board/sandbox/sandbox.c | 9 +++++++++
> common/board_r.c | 3 ++-
> test/dm/led.c | 3 +++
> 3 files changed, 14 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
Please see below.
>
> diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c
> index 195f620..66b5f24 100644
> --- a/board/sandbox/sandbox.c
> +++ b/board/sandbox/sandbox.c
> @@ -6,6 +6,7 @@
> #include <common.h>
> #include <cros_ec.h>
> #include <dm.h>
> +#include <led.h>
> #include <os.h>
> #include <asm/test.h>
> #include <asm/u-boot-sandbox.h>
> @@ -47,6 +48,14 @@ int dram_init(void)
> return 0;
> }
>
> +int board_init(void)
> +{
> +#ifdef CONFIG_LED
> + led_default_state();
if (IS_ENABLED(CONFIG_LED))
led_default_state();
> +#endif /* CONFIG_LED */
blank line here
> + return 0;
> +}
> +
> #ifdef CONFIG_BOARD_LATE_INIT
> int board_late_init(void)
> {
> diff --git a/common/board_r.c b/common/board_r.c
> index 64f2574..9402c0e 100644
> --- a/common/board_r.c
> +++ b/common/board_r.c
> @@ -690,7 +690,8 @@ static init_fnc_t init_sequence_r[] = {
> #ifdef CONFIG_DM
> initr_dm,
> #endif
> -#if defined(CONFIG_ARM) || defined(CONFIG_NDS32) || defined(CONFIG_RISCV)
> +#if defined(CONFIG_ARM) || defined(CONFIG_NDS32) || defined(CONFIG_RISCV) || \
> + defined(CONFIG_SANDBOX)
> board_init, /* Setup chipselects */
> #endif
> /*
> diff --git a/test/dm/led.c b/test/dm/led.c
> index 0071f21..00de7b3 100644
> --- a/test/dm/led.c
> +++ b/test/dm/led.c
> @@ -32,6 +32,9 @@ static int dm_test_led_default_state(struct unit_test_state *uts)
> {
> struct udevice *dev;
>
> + /* configure the default state (auto-probe) */
> + led_default_state();
> +
> /* Check that we handle the default-state property correctly. */
> ut_assertok(led_get_by_label("sandbox:default_on", &dev));
> ut_asserteq(LEDST_ON, led_get_state(dev));
> --
> 2.7.4
>
^ permalink raw reply
* [U-Boot] [PATCH v2 4/5] stm32mp1: use new function led default state
From: Simon Glass @ 2018-07-23 23:47 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532338891-6848-5-git-send-email-patrick.delaunay@st.com>
On 23 July 2018 at 03:41, Patrick Delaunay <patrick.delaunay@st.com> wrote:
> Initialize the led with the default state defined in device tree.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> Changes in v2: None
>
> board/st/stm32mp1/stm32mp1.c | 4 ++++
> 1 file changed, 4 insertions(+)
Reviewed-by: Simon Glass <sjg@chromium.org>
But I wonder if you can use if (IS_ENABLED(CONFIG_LED)) instead?
>
> diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
> index cc39fa6..db8c805 100644
> --- a/board/st/stm32mp1/stm32mp1.c
> +++ b/board/st/stm32mp1/stm32mp1.c
> @@ -22,5 +22,9 @@ int board_init(void)
> /* address of boot parameters */
> gd->bd->bi_boot_params = STM32_DDR_BASE + 0x100;
>
> +#ifdef CONFIG_LED
> + led_default_state();
> +#endif /* CONFIG_LED */
> +
> return 0;
> }
> --
> 2.7.4
>
^ permalink raw reply
* [U-Boot] [PATCH v2 2/5] Revert "dm: led: auto probe() LEDs with "default-state""
From: Simon Glass @ 2018-07-23 23:47 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1532338891-6848-3-git-send-email-patrick.delaunay@st.com>
Hi Patrick,
On 23 July 2018 at 03:41, Patrick Delaunay <patrick.delaunay@st.com> wrote:
> This reverts commit bc882f5d5c7b4d6ed5e927bf838863af43c786e7.
A revert should have a motivation and a discussion of the purpose,
just like any other patch. Can you add it please?
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> Changes in v2: None
>
> drivers/led/led_gpio.c | 9 ---------
> 1 file changed, 9 deletions(-)
Regards,
Simon
^ permalink raw reply
* HI
From: Mrs Suzara Maling Wan @ 2018-07-23 22:42 UTC (permalink / raw)
--
I am Mrs Suzara i have a pending project of fulfillment to put in your
hand, i will need your support to make this ream come through, could
you le me know your interest to enable me give you further information,
and I hereby advice that you send the below mentioned information I
decided to will/donate the sum of $4.5 Million US to you for the good
work of god, and also to help the motherless and less privilege and
also forth assistance of the widows.
At the moment I cannot take an telephone calls right now due to the
fact that my relatives (that have squandered the funds agave them for
this purpose before) are around me and my health status also. I have
adjusted my will and my lawyer is aware. I have willed those properties
to you by quoting my personal file routing and account information. And
I have also notified the bank that I am willing that properties to you
for a good, effective and prudent\work.
I know I don't know you but I have been directed to do this by god.ok
Please contact this woman for more details you might not get me on line
in time contact this email; mrs.suzaramalingwan1962@gmail.com
Your full name..........
Your private telephone number..........
Your passport or identity card........
Your country....................... ...
Your occupation..............
Thank you as i wait your reply.
Yoursfaithful friand,
Mrs Suzara Maling Wan
^ permalink raw reply
* [PATCH] tpm: add support for partial reads
From: Tadeusz Struk @ 2018-07-23 23:42 UTC (permalink / raw)
To: linux-security-module
In-Reply-To: <20180723220822.GJ532@ziepe.ca>
On 07/23/2018 03:08 PM, Jason Gunthorpe wrote:
> On Mon, Jul 23, 2018 at 03:00:20PM -0700, Tadeusz Struk wrote:
>> On 07/23/2018 02:56 PM, Jason Gunthorpe wrote:
>>> The proposed patch doesn't clear the data_pending if the entire buffer
>>> is not consumed, so of course it is ABI breaking, that really isn't OK.
>> The data_pending will be cleared by the timeout handler if the user doesn't
>> read the response fully before the timeout expires. The is the same situation
>> if the user would not read the response at all.
> That causes write() to fail with EBUSY
>
> NAK from me on breaking the ABI like this
What if we introduce this new behavior only for the non-blocking mode
as James suggested? Or do you have some other suggestions?
Thanks,
--
Tadeusz
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [Fuego] [PATCH] busybox: add support for command head/hexdump/hostname/id/ifconfig/install
From: Tim.Bird @ 2018-07-23 23:34 UTC (permalink / raw)
To: wangmy, fuego
In-Reply-To: <1532324114-87301-2-git-send-email-wangmy@cn.fujitsu.com>
See comments inline below.
> -----Original Message-----
> From: Wang Mingyu
>
> Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
> ---
> .../tests/Functional.busybox/tests/busybox_head.sh | 22
> ++++++++++++++++++++++
> .../Functional.busybox/tests/busybox_hexdump.sh | 19
> +++++++++++++++++++
> .../Functional.busybox/tests/busybox_hostname.sh | 13 +++++++++++++
> .../tests/Functional.busybox/tests/busybox_id.sh | 13 +++++++++++++
> .../Functional.busybox/tests/busybox_ifconfig.sh | 13 +++++++++++++
> .../Functional.busybox/tests/busybox_install.sh | 17 +++++++++++++++++
> 6 files changed, 97 insertions(+)
> create mode 100644
> engine/tests/Functional.busybox/tests/busybox_head.sh
> create mode 100644
> engine/tests/Functional.busybox/tests/busybox_hexdump.sh
> create mode 100644
> engine/tests/Functional.busybox/tests/busybox_hostname.sh
> create mode 100644 engine/tests/Functional.busybox/tests/busybox_id.sh
> create mode 100644
> engine/tests/Functional.busybox/tests/busybox_ifconfig.sh
> create mode 100644
> engine/tests/Functional.busybox/tests/busybox_install.sh
>
> diff --git a/engine/tests/Functional.busybox/tests/busybox_head.sh
> b/engine/tests/Functional.busybox/tests/busybox_head.sh
> new file mode 100644
> index 0000000..be0269e
> --- /dev/null
> +++ b/engine/tests/Functional.busybox/tests/busybox_head.sh
> @@ -0,0 +1,22 @@
> +#!/bin/sh
> +
> +# The testscript checks the following options of the command head
> +# 1) Option -n
> +
> +test="head"
> +
> +mkdir test_dir
> +touch test_dir/test1
This is not needed (the 'touch')
> +echo "This is the 1st line.">test_dir/test1
> +echo "This is the 2nd line.">>test_dir/test1
> +echo "This is the 3rd line.">>test_dir/test1
> +busybox head -n 2 test_dir/test1 > log
Please use a space before the redirection operator.
> +
> +if [ "$(busybox head -n 1 log)" = "This is the 1st line." ] && [ "$(tail -n 1 log)"
> = "This is the 2nd line." ]
> +then
> + echo " -> $test: TEST-PASS"
> +else
> + echo " -> $test: TEST-FAIL"
> +fi;
> +rm log
> +rm -rf test_dir
> diff --git a/engine/tests/Functional.busybox/tests/busybox_hexdump.sh
> b/engine/tests/Functional.busybox/tests/busybox_hexdump.sh
> new file mode 100644
> index 0000000..d598c72
> --- /dev/null
> +++ b/engine/tests/Functional.busybox/tests/busybox_hexdump.sh
> @@ -0,0 +1,19 @@
> +#!/bin/sh
> +
> +# The testscript checks the following options of the command hexdump
> +# 1) Option: -c
> +
> +test="hexdump"
> +
> +mkdir test_dir
> +touch test_dir/test1
> +echo "HELLO WORLD">test_dir/test1
> +busybox hexdump -c test_dir/test1 > log
> +if head -n 1 log | grep "0000000 H E L L O W O R L D \\\n" && [
> "$(tail -n 1 log)" = "000000c" ]
> +then
> + echo " -> $test: TEST-PASS"
> +else
> + echo " -> $test: TEST-FAIL"
> +fi;
> +rm log
> +rm -rf test_dir
> diff --git a/engine/tests/Functional.busybox/tests/busybox_hostname.sh
> b/engine/tests/Functional.busybox/tests/busybox_hostname.sh
> new file mode 100644
> index 0000000..f854515
> --- /dev/null
> +++ b/engine/tests/Functional.busybox/tests/busybox_hostname.sh
> @@ -0,0 +1,13 @@
> +#!/bin/sh
> +
> +# The testscript checks the following options of the command hostname
> +# 1) Option none
> +
> +test="hostname"
> +
> +if [ $(busybox hostname) = $(hostname) ]
On a busybox-based system, this just tests the program against itself.
Maybe compare with $(cat /etc/hostname)?
> +then
> + echo " -> $test: TEST-PASS"
> +else
> + echo " -> $test: TEST-FAIL"
> +fi;
> diff --git a/engine/tests/Functional.busybox/tests/busybox_id.sh
> b/engine/tests/Functional.busybox/tests/busybox_id.sh
> new file mode 100644
> index 0000000..9f53fcc
> --- /dev/null
> +++ b/engine/tests/Functional.busybox/tests/busybox_id.sh
> @@ -0,0 +1,13 @@
> +#!/bin/sh
> +
> +# The testscript checks the following options of the command id
> +# 1) Option none
> +
> +test="id"
> +
> +if [ "$(busybox id)" = "$(id)" ]
Same issue here. If busybox is the main tool for a board, then
'id' will just be a symlink to busybox, and this test just verifies
that the same command produces the same output.
This one I'm not sure what to do with this one. Maybe
see if there's a shell variable that has the UID?
Or, check that 'id' is not 'busybox id'?
Let me know what you think.
> +then
> + echo " -> $test: TEST-PASS"
> +else
> + echo " -> $test: TEST-FAIL"
> +fi;
> diff --git a/engine/tests/Functional.busybox/tests/busybox_ifconfig.sh
> b/engine/tests/Functional.busybox/tests/busybox_ifconfig.sh
> new file mode 100644
> index 0000000..31b07d2
> --- /dev/null
> +++ b/engine/tests/Functional.busybox/tests/busybox_ifconfig.sh
> @@ -0,0 +1,13 @@
> +#!/bin/sh
> +
> +# The testscript checks the following options of the command ifconfig
> +# 1) Option none
> +
> +test="ifconfig"
> +
> +if busybox ifconfig
> +then
> + echo " -> $test: TEST-PASS"
> +else
> + echo " -> $test: TEST-FAIL"
> +fi;
> diff --git a/engine/tests/Functional.busybox/tests/busybox_install.sh
> b/engine/tests/Functional.busybox/tests/busybox_install.sh
> new file mode 100644
> index 0000000..a8cba56
> --- /dev/null
> +++ b/engine/tests/Functional.busybox/tests/busybox_install.sh
> @@ -0,0 +1,17 @@
> +#!/bin/sh
> +
> +# The testscript checks the following options of the command install
> +# 1) Option none
> +
> +test="install"
> +
> +mkdir test_dir test_install_dir
> +echo "ls test_install_dir">test_dir/test1
I'm not sure what's going on here.
test1 should have the contents: 'ls test_install_dir'.
It's not clear to me that this is executable.
> +busybox install test_dir/test1 test_install_dir
> +if [ $(./test_install_dir/test1) = test1 ]
Are you trying to execute the script?
I'm confused.
> +then
> + echo " -> $test: TEST-PASS"
> +else
> + echo " -> $test: TEST-FAIL"
> +fi;
> +rm -rf test_dir test_install_dir;
> --
> 1.8.3.1
Thanks for the patch.
Please address my feedback and re-submit.
(Note: Sorry - but I will be out-of-the-office the rest of this week,
so my responses will be delayed until next week.)
Regards,
-- Tim
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
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.