From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04906EE14D3 for ; Wed, 6 Sep 2023 19:46:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 96C39821A8; Wed, 6 Sep 2023 19:46:31 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 96C39821A8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J2-hnQYt9KZk; Wed, 6 Sep 2023 19:46:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id CC5258211D; Wed, 6 Sep 2023 19:46:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org CC5258211D Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id B87471BF334 for ; Wed, 6 Sep 2023 19:46:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 9D44941B42 for ; Wed, 6 Sep 2023 19:46:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9D44941B42 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L--acDKXIyJ3 for ; Wed, 6 Sep 2023 19:46:14 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by smtp4.osuosl.org (Postfix) with ESMTPS id ACD1441920 for ; Wed, 6 Sep 2023 19:46:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org ACD1441920 Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 386JckQI010158; Wed, 6 Sep 2023 19:46:14 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3sxykm8ba9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Sep 2023 19:46:13 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 386ICcC6012257; Wed, 6 Sep 2023 19:46:12 GMT Received: from smtprelay03.wdc07v.mail.ibm.com ([172.16.1.70]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3svhkk5ps7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Sep 2023 19:46:12 +0000 Received: from smtpav06.wdc07v.mail.ibm.com (smtpav06.wdc07v.mail.ibm.com [10.39.53.233]) by smtprelay03.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 386JkCx065995108 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 6 Sep 2023 19:46:12 GMT Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2923D5804E; Wed, 6 Sep 2023 19:46:12 +0000 (GMT) Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 11C815803F; Wed, 6 Sep 2023 19:46:12 +0000 (GMT) Received: from arbab-laptop.localdomain (unknown [9.53.178.221]) by smtpav06.wdc07v.mail.ibm.com (Postfix) with ESMTPS; Wed, 6 Sep 2023 19:46:12 +0000 (GMT) Received: by arbab-laptop.localdomain (Postfix, from userid 152845) id 45685CB578; Wed, 6 Sep 2023 14:46:11 -0500 (CDT) From: Reza Arbab To: buildroot@buildroot.org Date: Wed, 6 Sep 2023 14:46:07 -0500 Message-Id: <20230906194609.74080-4-arbab@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20230906194609.74080-1-arbab@linux.ibm.com> References: <20230906194609.74080-1-arbab@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 2eCGOpdvzx3Fy2fH-iSyEJEDXWRiPlNp X-Proofpoint-GUID: 2eCGOpdvzx3Fy2fH-iSyEJEDXWRiPlNp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-06_06,2023-09-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 priorityscore=1501 suspectscore=0 mlxlogscore=480 spamscore=0 bulkscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309060169 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=SmqZedyNLd8vCGDrdA7JiuISxMcsRIfh49plILFTbCw=; b=p5H9oyAIe4GcJuDCCxM7tjGaLJcoT0ppVX/DC7WVvjw32J0b7GjSRxZHw19YzOVB45L8 KkRgpdkpxD2aEAF/KgCnG9JcYZ+bQ6Xpp+IkC7rZg+paSEXbLuC+LqWzCUTwapQhC48h Vit++PhayGqYid9uU72BjqYzLyJvrProWZAqYw9X2wvQ94y7H5UFYEt48IK1o/hP1Aqi XgTXJ9XYvjOtBYvGD2Po7R/bHAb5tG+xnDG7VPmqAzIKM/J4sbwksgwm3iFuxFTLFf3q OXTTB7+NC5NqwwKJvQdzRmemD8x38wDmwXghNDRtIV5mwVucOWS7gMJNs439LnvZ8oma Dg== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=p5H9oyAI Subject: [Buildroot] [PATCH 3/5] package/petitboot: poll removable devices X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Reza Arbab , Laurent Vivier , Joel Stanley Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Add a udev rule to enable notification of media change events on removable devices, so petitboot can dynamically adapt to them. Signed-off-by: Reza Arbab --- package/petitboot/petitboot.mk | 2 ++ package/petitboot/removable-event-poll.rules | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 package/petitboot/removable-event-poll.rules diff --git a/package/petitboot/petitboot.mk b/package/petitboot/petitboot.mk index 556d41230237..9326738aa038 100644 --- a/package/petitboot/petitboot.mk +++ b/package/petitboot/petitboot.mk @@ -57,6 +57,8 @@ define PETITBOOT_POST_INSTALL $(TARGET_DIR)/etc/init.d/S15pb-discover $(INSTALL) -D -m 0755 $(PETITBOOT_PKGDIR)/petitboot-console-ui.rules \ $(TARGET_DIR)/etc/udev/rules.d/petitboot-console-ui.rules + $(INSTALL) -D -m 0755 $(PETITBOOT_PKGDIR)/removable-event-poll.rules \ + $(TARGET_DIR)/etc/udev/rules.d/removable-event-poll.rules $(INSTALL) -D -m 0755 $(PETITBOOT_PKGDIR)/sysctl.conf \ $(TARGET_DIR)/etc/sysctl.d/petitboot.conf mkdir -p $(TARGET_DIR)/usr/share/udhcpc/default.script.d/ diff --git a/package/petitboot/removable-event-poll.rules b/package/petitboot/removable-event-poll.rules new file mode 100644 index 000000000000..57bb74d3c00c --- /dev/null +++ b/package/petitboot/removable-event-poll.rules @@ -0,0 +1,3 @@ +# petitboot needs notification for media change events on removable devices, +# which we only get if we've set the poll_msecs sysfs attribute. +ACTION!="remove", ATTR{removable}=="1", ATTR{events_poll_msecs}="2000" -- 2.39.3 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot