Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Kenton <skenton@ou.edu>
To: buildroot@busybox.net
Subject: [Buildroot]  Something odd about  /dev/console creation
Date: Sat, 28 Mar 2015 15:17:18 -0500	[thread overview]
Message-ID: <55170C4E.1080403@ou.edu> (raw)
In-Reply-To: <5515D638.9090502@mind.be>

It looks like there is something odd going on with the creation of /dev/console
There also seems to be some unintended mixing of creation of the cpio filesystem
vs installing it as an initramfs as controlled by these settings.

BR2_TARGET_ROOTFS_CPIO
BR2_TARGET_ROOTFS_INITRAMFS

Which can result in /init being created and populated with the script for an initramfs
boot when in fact it is not needed if BR2_TARGET_ROOTFS_CPIO os set and BR2_TARGET_ROOTFS_INITRAMFS
is not. It does not seem to hurt anything but is odd to see.

# Anyway, back to /dev/console apparently always being created in the on-disk filesystem.
# As far as I can tell this line always gets executed during any buildroot make
# independent of the above settings for actually creating a cpio filesystem or initramfs
./fs/cpio/cpio.mk:PACKAGES_PERMISSIONS_TABLE += /dev/console c 622 0 0 5 1 - - -$(sep)

# Which means that this line:
./fs/common.mk:	printf '$$(subst $$(sep),\n,$$(PACKAGES_PERMISSIONS_TABLE))' >> $$(FULL_DEVICE_TABLE)

# will always add /dev/console to _device_table.txt for creation during the build (example from my usual build)
printf '	/bin/busybox                     f 4755 0  0 - - - - -\n	/usr/share/udhcpc/default.script f 755  0  0 - - - - -\n \  # split for email readability
/dev/console c 622 0 0 5 1 - - -\n' >> /data/bcdist/buildroot-2015.02/output/build/_device_table.txt


# I got lost in the maze of twisty windy make rules, all different, so I
# added a syntactically invalid 'puke here' to the fs/cpio/cpio.mk as shown here
PACKAGES_PERMISSIONS_TABLE += /dev/console c 622 0 0 5 1 - - -$(sep)
puke here
# Then did 'make defconfig; make -d' in a clean buildroot tree and generated this output when it died
# which definitely shows it's being read, even when no kernel is being built.
...
Reading makefile 'fs/cpio/cpio.mk' (search path) (no ~ expansion)...
fs/cpio/cpio.mk:25: *** missing separator (did you mean TAB instead of 8 spaces?).  Stop.

# Without the 'puke here' the minimal build results in a dev directory containing these files:
# .../buildroot-2015.02$ ls -l /output/target/dev
total 4
-rw--w--w- 1 steve steve    0 Mar 28 14:32 console
lrwxrwxrwx 1 steve steve   10 Mar  1 15:26 log -> ../tmp/log
drwxrwxr-x 2 steve steve 4096 Mar  1 15:26 pts


I'm not sure how to proceed from here but I don't think the current situation is 'correct'

Steve Kenton

  parent reply	other threads:[~2015-03-28 20:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 17:44 [Buildroot] Where is /dev/console created when using devtmpfs? Steve Kenton
2015-03-26 19:51 ` Rob Landley
2015-03-27  4:14   ` Steve Kenton
2015-03-27 22:14     ` Arnout Vandecappelle
2015-03-27 23:35       ` Steve Kenton
2015-03-28 20:17       ` Steve Kenton [this message]
2015-03-28 23:04       ` Rob Landley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55170C4E.1080403@ou.edu \
    --to=skenton@ou.edu \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox