X-Original-To: alpine-user@lists.alpinelinux.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by lists.alpinelinux.org (Postfix) with ESMTP id C409CF831D6 for ; Mon, 20 May 2019 10:40:52 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id e15so14014651wrs.4 for ; Mon, 20 May 2019 03:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=h6g-de.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=Q0wrm458id2dBee2bJ3QFH74aLgKVOcdzAJIAoiHaWA=; b=jC6tROHjZ00LLOcnN9kXxtC3s2AQVD5YMT/xyMkKVmdXupdpzMim2DcFvobwctGXJY 5sq8/pcoPsfEL1/mZwBhbnckm6Bt1g+lsIYPc7ZY8dNBtu/YfGGoROmXaMDzKrcSc9ek pzNWNFR6n+TXneNq+isEt8qQn+2tEohsNYB6O7JIN5UAp6+O1CRdBZQUIY7PgVj3hcLl pTjmg2Bs5bFfpXLO2eQEjKDE+unIk9Gf+nTG/u1GnwNJG0DEZXW4L6H1jIJHZ0gqM0tG xWcDPuitCtPAgMurbCHI0VwZlv+VG6PvfeLNMy5duIlLUPdnNgBt3Mp+xk7TEDPyXSf+ BCSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=Q0wrm458id2dBee2bJ3QFH74aLgKVOcdzAJIAoiHaWA=; b=p6EOgR5jaOtzm+LhxBDudp6RCgXige88wc2DkEYT5/aFx/bwjFU/KIxnHH4up7YFBi 7icMYCCybyKaa+1s1sQWY7Zava7Ac0u8k0D49GmqdvwwDzrxkwjO5BoOPks2aQk38eSu YE0UYfQYiKCupRPN0OoFBOOCtC4AhcS3IcSlS+6jIiWYHOBJgiIAbKFde3yaqIaK8MRG V3WitCAaOIBv+ingemvYLoo+1l9xsyFQAbNQRcSvxTAyY+VOS0jCuLQmsC8OLo3ee3j3 vnMB0KzXsgzIeKD2febzjU/cDo+JW6++sYAFprv0czx4dKUs/y4Lgd3XHmx+etIHVQ/q bk9g== X-Gm-Message-State: APjAAAUPb9exy+PnyXfpSvcgZuZrirqKyEdbvEsbSGR/J8QZePBTHuLb ihto3YArwoSBKzP6rew86Hd1V3FgAiA= X-Google-Smtp-Source: APXvYqzBZfURxgjdmbD/YNOCpFGP8EkxHKbVKYaqA1+HNBRcqA6t64kDBdWd8Zf7KEu6KaDQ+HnRrQ== X-Received: by 2002:a5d:4d51:: with SMTP id a17mr11816652wru.260.1558348851855; Mon, 20 May 2019 03:40:51 -0700 (PDT) Received: from [172.20.20.100] (ip1f10ed38.dynamic.kabel-deutschland.de. [31.16.237.56]) by smtp.gmail.com with ESMTPSA id t66sm8802769wmf.39.2019.05.20.03.40.50 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 20 May 2019 03:40:51 -0700 (PDT) Subject: Re: [alpine-user] What is the best install type for embedded projects on the Raspberry Pi Zero? To: alpine-user@lists.alpinelinux.org References: From: Paul Zillmann Message-ID: Date: Mon, 20 May 2019 12:41:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 X-Mailinglist: alpine-user Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------CBCD2D58BBD21F7CECEB08DB" Content-Language: en-US This is a multi-part message in MIME format. --------------CBCD2D58BBD21F7CECEB08DB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hello East, loadable Kernel modules are stored in /lib/modules and don't have to be in the in the /boot/ folder like in FreeBSD. If that would be the case, you can easyli mount a folder onto another (mount bind). Same is true for mounting a fat32 formatted partition (/dev/mmcblk0 if I'm not mistaked) to /boot/ if you are used to work with the Linux Filesystem Structure. I'll take a look into the wiki. - Paul Am 19.05.19 um 13:54 schrieb East: > Hello, > > I am working on a project that I want to use Alpine as the base for, > however I am running into problems with resource usage. Specifically, > I have limited constraints on RAM. Normally, a diskless install just > loads everything into memory. Now, that may work for some platforms, > but I only have 512MB of RAM, and I need to install relatively large > dependencies and an X server. 512MB goes by fast. > > Normally, I would just do a sys install. The problem is, this is > complicated on the Pi 1/Zero. From here > : > > "Beware, though, that *the contents of /boot will be ignored when the > Pi boots*: it will use the kernel, initramfs, and modloop images from > the FAT32 boot partition. To update the kernel, initfs or modules, you > will need to manually (generate and) copy these to the boot partition > or you could use bind mount so that manually copy the files to boot > partition is not needed." > > I am dealing with relatively low level stuff, and while I can't be > sure, having the kernel and other core components not existing on the > same partition as the rest of the filesystem is likely to cause > problems. For example: how do I enable I2C with a setup like that? > IIRC that requires a kernel module to be enabled, and if the wiki is > to be believed, then that means I have to copy over files to the FAT32 > partition if I do that. It just seems messy, and that is a headache I > would like to avoid. It also throws a wrench into the works when--once > I finally have a way to build the images that I will ship--this kludgy > method randomly breaks. > > Maybe I am misunderstanding this. Nonetheless: > > How exactly does diskless mode work? I know that it loads everything > into RAM, but if I create an APKOVL and then use it to store state, > that loads everything into RAM on boot, right? Is there a way to > reduce the RAM footprint by only loading the Alpine base into RAM, > while storing the contents of the APKOVL on disk? If so, that is the > most convenient solution. > > Is there a better way to handle a sys install on RPi Zero than is > documented in the wiki? > > Is there a better way to achieve this, period? > --------------CBCD2D58BBD21F7CECEB08DB Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Hello East,

loadable Kernel modules are stored in /lib/modules and don't have to be in the in the /boot/ folder like in FreeBSD. If that would be the case, you can easyli mount a folder onto another (mount bind).

Same is true for mounting a fat32 formatted partition (/dev/mmcblk0 if I'm not mistaked) to /boot/ if you are used to work with the Linux Filesystem Structure.

I'll take a look into the wiki.

- Paul

Am 19.05.19 um 13:54 schrieb East:
Hello,

I am working on a project that I want to use Alpine as the base for, however I am running into problems with resource usage. Specifically, I have limited constraints on RAM. Normally, a diskless install just loads everything into memory. Now, that may work for some platforms, but I only have 512MB of RAM, and I need to install relatively large dependencies and an X server. 512MB goes by fast.

Normally, I would just do a sys install. The problem is, this is complicated on the Pi 1/Zero. From here:

"Beware, though, that the contents of /boot will be ignored when the Pi boots: it will use the kernel, initramfs, and modloop images from the FAT32 boot partition. To update the kernel, initfs or modules, you will need to manually (generate and) copy these to the boot partition or you could use bind mount so that manually copy the files to boot partition is not needed."

I am dealing with relatively low level stuff, and while I can't be sure, having the kernel and other core components not existing on the same partition as the rest of the filesystem is likely to cause problems. For example: how do I enable I2C with a setup like that? IIRC that requires a kernel module to be enabled, and if the wiki is to be believed, then that means I have to copy over files to the FAT32 partition if I do that. It just seems messy, and that is a headache I would like to avoid. It also throws a wrench into the works when--once I finally have a way to build the images that I will ship--this kludgy method randomly breaks.

Maybe I am misunderstanding this. Nonetheless:

How exactly does diskless mode work? I know that it loads everything into RAM, but if I create an APKOVL and then use it to store state, that loads everything into RAM on boot, right? Is there a way to reduce the RAM footprint by only loading the Alpine base into RAM, while storing the contents of the APKOVL on disk? If so, that is the most convenient solution.

Is there a better way to handle a sys install on RPi Zero than is documented in the wiki?

Is there a better way to achieve this, period?


--------------CBCD2D58BBD21F7CECEB08DB-- --- Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org Help: alpine-user+help@lists.alpinelinux.org ---