* Re: [Buildroot] 2023.02 : pty_allocate: openpty: No such file or directory
[not found] <CABRndgw1EVFyDNDcRJ10gOPFfw-gH+7Gqx7P537EiSVr5Wq6Kw@mail.gmail.com>
@ 2023-03-20 8:51 ` Peter Korsgaard
[not found] ` <CABRndgyqeJXm6XqwYQ_QUaQAGB9EENSq4dc3qLaq6Y3RUhxFUg@mail.gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2023-03-20 8:51 UTC (permalink / raw)
To: Zvi Vered; +Cc: buildroot
>>>>> "Zvi" == Zvi Vered <veredz72@gmail.com> writes:
> Hello,
> I built rootfs for aarch64 (little endian) and used it to boot cortex A-53
> with kernel 4.9.x
> After login (+password) I ran dropbear (included in buildroot) with:
> dropbear -F -R -E
> and got no errors.
> Upon trying to connect via SSH from ssh client I got:
> pty_allocate: openpty: No such file or directory
> No pty was allocated, couldn't execute
> Exit (root) from <10.0.0.1:51333>: Error reading Connection reset by peer
> Can you please advise what can be done?
Can you provide some more details, please? Dropbear installs an
initscript so it should normally start up automatically.
The openpty issue sounds like your kernel perhaps doesn't have pty
support. Did you enable CONFIG_UNIX98_PTYS / CONFIG_LEGACY_PTYS in the
kernel configuration?
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] 2023.02 : pty_allocate: openpty: No such file or directory
[not found] ` <CABRndgyqeJXm6XqwYQ_QUaQAGB9EENSq4dc3qLaq6Y3RUhxFUg@mail.gmail.com>
@ 2023-03-21 18:49 ` Peter Korsgaard
[not found] ` <CABRndgwMRVDXzSAoGb5fU9PqM2b6z6we5rH40_NCs7w12LHiDA@mail.gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2023-03-21 18:49 UTC (permalink / raw)
To: Zvi Vered; +Cc: buildroot
>>>>> "Zvi" == Zvi Vered <veredz72@gmail.com> writes:
> Hi Peter,
> Thank you for your reply.
> Attached .config of my kernel and buildroot.
> It seems that the mandatory components you mentioned are included.
> Following are the messages I'm getting at the end of the boot sequence:
> -----------------------------------------------------------------------
> [ 3.048901] of_cfs_init
> [ 3.051352] of_cfs_init: OK
> [ 3.054227] clk: Not disabling unused clocks
> [ 3.058673] ALSA device list:
> [ 3.061628] No soundcards found.
> [ 3.065509] Freeing unused kernel memory: 512K
> can't open /dev/null: No such file or directory
> can't open /dev/null: No such file or directory
> can't open /dev/null: No such file or directory
> can't open /dev/null: No such file or directory
No /dev/null? That already sounds odd. How is your setup exactly?
E.G. what (def)config have you used and how are you booting your system?
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] 2023.02 : pty_allocate: openpty: No such file or directory
[not found] ` <CABRndgwMRVDXzSAoGb5fU9PqM2b6z6we5rH40_NCs7w12LHiDA@mail.gmail.com>
@ 2023-03-21 19:28 ` Peter Korsgaard
[not found] ` <CABRndgz8n37jikSwt3uBkGTM-UBObYcny6xEqhnFkDod9dae1Q@mail.gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2023-03-21 19:28 UTC (permalink / raw)
To: Zvi Vered; +Cc: buildroot
>>>>> "Zvi" == Zvi Vered <veredz72@gmail.com> writes:
> Hi Peter,
> Attached .config of the kernel. This is also the (def)config.
> The kernel is launched by u-boot.
> The kernel image, root file system, and device tree are all loaded via TFTP
> from an external PC.
What kind of rootfs filesystem are you using? What is your kernel
command line?
> After login (+password) I checked that /dev/null exists.
Can you show the output of ls -la /dev/null?
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] 2023.02 : pty_allocate: openpty: No such file or directory
[not found] ` <CABRndgz8n37jikSwt3uBkGTM-UBObYcny6xEqhnFkDod9dae1Q@mail.gmail.com>
@ 2023-03-22 21:59 ` Peter Korsgaard
[not found] ` <CABRndgycL0_hvf5dizJDby8VeW_z4xSnTZkXUOsVsXwy==yheA@mail.gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2023-03-22 21:59 UTC (permalink / raw)
To: Zvi Vered; +Cc: buildroot
>>>>> "Zvi" == Zvi Vered <veredz72@gmail.com> writes:
> Hi Peter,
> The output of: ls -la /dev/null :
> -rw-rw---- 1 root root 256 Dec 23 13:07 /dev/null
So /dev/null is a regular file, not a character device?
> In S60rcma (my script, in /etc/init.d) I added:
> mdev -s
> dropbear -R -E
> After login, ssh client works fine.
> It seems adding "mdev" solved the problem.
> I think buildroot rootfs should solve it without adding any script.
It does. Again, please provide more details - E.G. how does your
Buildroot .config look like and how do you get the rootfs onto your
target?
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] 2023.02 : pty_allocate: openpty: No such file or directory
[not found] ` <CABRndgycL0_hvf5dizJDby8VeW_z4xSnTZkXUOsVsXwy==yheA@mail.gmail.com>
@ 2023-03-23 6:56 ` Peter Korsgaard
[not found] ` <CABRndgzV8hKy1pyRCNm+sgi_ePoHgYrS5h_4ca2bZd3E006nPQ@mail.gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2023-03-23 6:56 UTC (permalink / raw)
To: Zvi Vered; +Cc: buildroot
>>>>> "Zvi" == Zvi Vered <veredz72@gmail.com> writes:
> Hi Peter,
> Attached .config of buildroot.
> Did you get it ?
Yes. So I see that you do not create any filesystem images, only our
default rootfs.tar?
> Today I will send the exact script of how I'm packing the tree files of the
> rootfs into one file that u-boot loads via TFTP.
Ok, any specific reason for wanting to do this in a custom way rather
than E.G. letting Buildroot build your Linux kernel and embed the rootfs
as an initramfs?
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] 2023.02 : pty_allocate: openpty: No such file or directory
[not found] ` <CABRndgzV8hKy1pyRCNm+sgi_ePoHgYrS5h_4ca2bZd3E006nPQ@mail.gmail.com>
@ 2023-03-24 6:36 ` Peter Korsgaard
[not found] ` <CABRndgz5EeQhEkqHG0R=T0AvQnzOLHbabO+MjkYH9UHK53pL8g@mail.gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2023-03-24 6:36 UTC (permalink / raw)
To: Zvi Vered; +Cc: buildroot
>>>>> "Zvi" == Zvi Vered <veredz72@gmail.com> writes:
Hello,
> Hi Peter,
> I did not know about an option to embed the rootfs as an initramfs.
> The "custom way" is always plan B.
> Can you please specify what I should modify in the .config of buildroot for
> this purpose ?
If you configure Buildroot to build your Linux kernel as well, then you
will see a new option under filesystem images called "initial RAM
filesystem linked into linux kernel".
> Currently I extract rootfs.tar and then run the following script:
> ------------------------------------------------------------------------------------------------------------
> ./kernel/linux-xlnx/scripts/gen_initramfs_list.sh ../rootfs > initramfs_list
> ./kernel/linux-xlnx/usr/gen_init_cpio initramfs_list > rootfs.cpio
> gzip rootfs.cpio
> ./u-boot/u-boot-xlnx/tools/mkimage -A arm64 -T ramdisk -C gzip -n
> 'petalinux-user-image-plnx-zynqmp' -d rootfs.cpio.gz rootfs.cpio.gz.u-boot
> -------------------------------------------------------------------------------------------------------------
> This creates rootfs.cpio.gz.u-boot which is loaded via TFTP.
You presumably do this as a normal user, so file ownership will be wrong
and device nodes (like your /dev/null problem) cannot be correctly
created.
Even if you don't want to build a Linux kernel with Buildroot you can
replace those 4 steps with the cpio filesystem option in Buildroot,
E.G.:
[*] cpio the root filesystem (for use as an initial RAM filesystem)
cpio type (cpio the whole root filesystem) --->
Compression method (gzip) --->
[*] Create U-Boot image of the root filesystem
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] 2023.02 : pty_allocate: openpty: No such file or directory
[not found] ` <CABRndgwHc_rpSxXqMdMmGb+3yDy5FSAjk=UDqeA0CvRS13=oiQ@mail.gmail.com>
@ 2023-03-25 10:37 ` Peter Korsgaard
[not found] ` <CABRndgyK0f71HMi15+r8k0nu51sHQrRDx=OA7e5BWR6Oudhnbg@mail.gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2023-03-25 10:37 UTC (permalink / raw)
To: Zvi Vered; +Cc: buildroot
>>>>> "Zvi" == Zvi Vered <veredz72@gmail.com> writes:
> Hi Peter,
> Did not try rootfs.cpio.uboot created by buildroot yet.
> But I tried to extract rootfs.cpio (created by buildroot)
> /dev contains the following:
> -------------------------------------------------------------------------------------------------
> drwxr-xr-x 4 zvivered zvivered 4096 Mar 12 22:20 .
> drwxr-xr-x 17 zvivered zvivered 4096 Mar 14 20:31 ..
> lrwxrwxrwx 1 zvivered zvivered 15 Mar 12 22:20 fd -> ../proc/self/fd
> lrwxrwxrwx 1 zvivered zvivered 10 Mar 12 22:20 log -> ../tmp/log
> drwxr-xr-x 2 zvivered zvivered 4096 Mar 12 22:20 pts
> drwxr-xr-x 2 zvivered zvivered 4096 Mar 12 22:20 shm
> lrwxrwxrwx 1 zvivered zvivered 17 Mar 12 22:20 stderr ->
> ../proc/self/fd/2
> lrwxrwxrwx 1 zvivered zvivered 17 Mar 12 22:20 stdin -> ../proc/self/fd/0
> lrwxrwxrwx 1 zvivered zvivered 17 Mar 12 22:20 stdout ->
> ../proc/self/fd/1
> ------------------------------------------------------------------------------------------------------
> Can you please explain how rest of /dev files are created during boot
> sequence ?
The default for Buildroot is to use the devtmpfs filesystem in the
kernel to manage /dev, which will automatically create the needed device
nodes (see system configuration -> /dev management). This requires that
the kernel is built with CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y.
> None of the scripts contains mdev.
> I'm using the option:
> BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
> Is this the best option for automatic creation of /dev files ?
mdev is only needed if you need custom actions for device nodes,
E.G. special symlinks or module loading. Mdev also relies on devtmpfs as
explained above.
If you have enabled BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV, then you
should end up with a /etc/init.d/S10mdev init script to start up mdev.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] 2023.02 : pty_allocate: openpty: No such file or directory
[not found] ` <CABRndgyK0f71HMi15+r8k0nu51sHQrRDx=OA7e5BWR6Oudhnbg@mail.gmail.com>
@ 2023-03-27 19:12 ` Peter Korsgaard
0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2023-03-27 19:12 UTC (permalink / raw)
To: Zvi Vered; +Cc: buildroot
>>>>> "Zvi" == Zvi Vered <veredz72@gmail.com> writes:
> Hi Peter,
> I tried the file *rootfs.cpio.uboot* created by buildroot.
> *It works ! *
> dropbear is not killed and there are not /dev/null messages.
Ok, good!
> I want to add a few files to this rootfs and then pack it again to
> *rootfs.cpio.uboot*
> So I extracted rootfs.cpio with:
> cpio -idv < /tmp/rootfs.cpio
> *** Added few files to /root ****
> ls | cpio -ov > /tmp/rootfs.cpio
> gzip -f /tmp/rootfs.cpio
> ./u-boot/u-boot-xlnx/tools/mkimage -A arm64 -T ramdisk -C gzip -n 'zynqmp'
> -d /tmp/rootfs.cpio.gz /tmp/rootfs.cpio.gz.uboot
> Is this the right sequence ?
> I tried the new rootfs.cpio.gz.uboot. Boot hangs.
You need to do such things as root (or run under fakeroot) to ensure
correct permissions and device nodes, but the real way to make
modifications of the rootfs is explained in the Buildroot manual:
https://buildroot.org/downloads/manual/manual.html#rootfs-custom
> Thank you very much for your help,
You are welcome.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-03-27 19:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CABRndgw1EVFyDNDcRJ10gOPFfw-gH+7Gqx7P537EiSVr5Wq6Kw@mail.gmail.com>
2023-03-20 8:51 ` [Buildroot] 2023.02 : pty_allocate: openpty: No such file or directory Peter Korsgaard
[not found] ` <CABRndgyqeJXm6XqwYQ_QUaQAGB9EENSq4dc3qLaq6Y3RUhxFUg@mail.gmail.com>
2023-03-21 18:49 ` Peter Korsgaard
[not found] ` <CABRndgwMRVDXzSAoGb5fU9PqM2b6z6we5rH40_NCs7w12LHiDA@mail.gmail.com>
2023-03-21 19:28 ` Peter Korsgaard
[not found] ` <CABRndgz8n37jikSwt3uBkGTM-UBObYcny6xEqhnFkDod9dae1Q@mail.gmail.com>
2023-03-22 21:59 ` Peter Korsgaard
[not found] ` <CABRndgycL0_hvf5dizJDby8VeW_z4xSnTZkXUOsVsXwy==yheA@mail.gmail.com>
2023-03-23 6:56 ` Peter Korsgaard
[not found] ` <CABRndgzV8hKy1pyRCNm+sgi_ePoHgYrS5h_4ca2bZd3E006nPQ@mail.gmail.com>
2023-03-24 6:36 ` Peter Korsgaard
[not found] ` <CABRndgz5EeQhEkqHG0R=T0AvQnzOLHbabO+MjkYH9UHK53pL8g@mail.gmail.com>
[not found] ` <CABRndgwHc_rpSxXqMdMmGb+3yDy5FSAjk=UDqeA0CvRS13=oiQ@mail.gmail.com>
2023-03-25 10:37 ` Peter Korsgaard
[not found] ` <CABRndgyK0f71HMi15+r8k0nu51sHQrRDx=OA7e5BWR6Oudhnbg@mail.gmail.com>
2023-03-27 19:12 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox