From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-yk0-f181.google.com ([209.85.160.181]) by metis.ext.pengutronix.de with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from ) id 1ZX3oU-0002LB-Ia for ptxdist@pengutronix.de; Wed, 02 Sep 2015 10:54:39 +0200 Received: by ykei199 with SMTP id i199so3022554yke.0 for ; Wed, 02 Sep 2015 01:54:32 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <55E6B760.1090008@pengutronix.de> References: <55E6B0AD.1000207@pengutronix.de> <55E6B760.1090008@pengutronix.de> Date: Wed, 2 Sep 2015 16:54:31 +0800 Message-ID: From: Hardik A Gohil Subject: Re: [ptxdist] Script List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============1836037676==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de --===============1836037676== Content-Type: multipart/alternative; boundary=94eb2c0356f0aa3af1051ebfd04b --94eb2c0356f0aa3af1051ebfd04b Content-Type: text/plain; charset=UTF-8 On Wed, Sep 2, 2015 at 4:46 PM, Marc Kleine-Budde wrote: > On 09/02/2015 10:35 AM, Hardik A Gohil wrote: > > Hello > > > > On Wed, Sep 2, 2015 at 4:17 PM, Marc Kleine-Budde > > wrote: > > > > On 09/02/2015 09:44 AM, Hardik A Gohil wrote: > > > Hello, > > > > > > Can any one explain me this script from > > > rules/post/ptxd_make_image_common.make used while creating > root.ubifs image > > > > > > DOPERMISSIONS := '{ \ > > > if ($$1 == "f") \ > > > printf("chmod %s \".%s\"; chown %s.%s \".%s\";\n", > $$5, > > > $$2, $$3, $$4, $$2); \ > > > if ($$1 == "n") \ > > > printf("rm -f \".%s\"; mkdir -p \".`dirname > \"%s\"`\"; > > > mknod -m %s \".%s\" %s %s %s; chown %s.%s \".%s\";\n", $$2, $$2, > $$5, > > > $$2, $$6, $$7, $$8, $$3, $$4, $$2);}' > > > > This scripts generates chmod, chown commands to change the ownership > and > > permission of a file or generates commands to create device nodes > with > > given ownership and permissions. > > > > > > awk -F: $(DOPERMISSIONS) $(image/permissions) called from here > > > > I cannot find image/permissions file ?? > > ./rules/post/000_ptxd_make_image_definitions.make:12:image/permissions > := $(IMAGEDIR)/permissions > > ultimately the permissions file which I cannot find in the ptxdist directory. Actually I am creating a script to generate the root.ubifs separately from environment ------------------------------------------- LEB_SIZE="126976" MINIMUM_IO_UNIT_SIZE="2048" MAX_LEB_COUNT="3929" EXTRA_ARGS=" -F" ROOTFS=root.ubifs FS_SOURCE_PATH=/opt/PHYTEC_BSPs/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/root MKFS_UBIFS=/opt/PHYTEC_BSPs/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/sysroot-host/sbin/mkfs.ubifs $MKFS_UBIFS -d $FS_SOURCE_PATH -e $LEB_SIZE -m $MINIMUM_IO_UNIT_SIZE -c $MAX_LEB_COUNT $EXTRA_ARGS -o $ROOTFS ---------------------------------------------- I need to add the permission manipulation and trying to figure out how to fit in this script. -- Regards Hardik A Gohil Willowglen Msc Bhd --94eb2c0356f0aa3af1051ebfd04b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Wed, Sep 2, 2015 at 4:46 PM, Marc Kleine-Budde <= ;mkl@pengutronix.de= > wrote:
On 09/02/2015 10:35 AM, Hardik A Gohil wrote:
> Hello
>
> On Wed, Sep 2, 2015 at 4:17 PM, Marc Kleine-Budde <mkl@pengutronix.de
> <mailto:mkl@pengutronix.de>> wrote:
>
>=C2=A0 =C2=A0 =C2=A0On 09/02/2015 09:44 AM, Hardik A Gohil wrote:
>=C2=A0 =C2=A0 =C2=A0> Hello,
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> Can any one explain me this script from
>=C2=A0 =C2=A0 =C2=A0> rules/post/ptxd_make_image_common.make used wh= ile creating root.ubifs image
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> DOPERMISSIONS :=3D '{=C2=A0 =C2=A0 =C2=A0\=
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ($$1 =3D= =3D "f") \
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0printf("chmod %s \".%s\"; chown %s.%s \&quo= t;.%s\";\n", $$5,
>=C2=A0 =C2=A0 =C2=A0> $$2, $$3, $$4, $$2);=C2=A0 =C2=A0 \
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ($$1 =3D= =3D "n") \
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0printf("rm -f \".%s\"; mkdir -p \".`di= rname \"%s\"`\";
>=C2=A0 =C2=A0 =C2=A0> mknod -m %s \".%s\" %s %s %s; chown = %s.%s \".%s\";\n", $$2, $$2, $$5,
>=C2=A0 =C2=A0 =C2=A0> $$2, $$6, $$7, $$8, $$3, $$4, $$2);}'
>
>=C2=A0 =C2=A0 =C2=A0This scripts generates chmod, chown commands to cha= nge the ownership and
>=C2=A0 =C2=A0 =C2=A0permission of a file or generates commands to creat= e device nodes with
>=C2=A0 =C2=A0 =C2=A0given ownership and permissions.
>
>
> awk -F: $(DOPERMISSIONS) $(image/permissions) called from here
>
> I cannot find image/permissions file ??

./rules/post/000_ptxd_make_image_definitions.make:12:image/permissio= ns
:=3D $(IMAGEDIR)/permissions


ultimately the permissions file which I cannot find i= n the ptxdist directory.=C2=A0

Actually I am creating a script t= o generate the root.ubifs separately from environment

-------------= ------------------------------
LEB= _SIZE=3D"126976"
MINIMUM_IO_UNIT_SIZE=3D"2048"
MA= X_LEB_COUNT=3D"3929"
EXTRA_ARGS=3D" -F"
ROOTFS=3D= root.ubifs
FS_SOURCE_PATH=3D/opt/PHYTEC_BSPs/phyCORE-AM335x-PD13.1.2/pla= tform-phyCORE-AM335x/root
MKFS_UBIFS=3D/opt/PHYTEC_BSPs/phyCORE-AM335x-P= D13.1.2/platform-phyCORE-AM335x/sysroot-host/sbin/mkfs.ubifs

$MKFS_U= BIFS -d $FS_SOURCE_PATH -e $LEB_SIZE -m $MINIMUM_IO_UNIT_SIZE -c $MAX_LEB_C= OUNT $EXTRA_ARGS -o $ROOTFS


---------------------------------= -------------

I need to add the permission manipulation and trying t= o figure out how to fit in this script.

--
Regards
Hardik A Gohil
Willowglen Msc= Bhd

--94eb2c0356f0aa3af1051ebfd04b-- --===============1836037676== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline LS0gCnB0eGRpc3QgbWFpbGluZyBsaXN0CnB0eGRpc3RAcGVuZ3V0cm9uaXguZGUK --===============1836037676==--