-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch_root to real rootfs #147
Comments
Dear monrick,
I'm going to assume that since you mention Ariane, you are talking about
the forthcoming ariane-v0.7 release.
First off, why don't you use the rescue kernel that comes with
lowrisc-chip, this
is much more economical than the size of buildroot.
It's not always a good idea to mix buildroot images with Debian images.
Each environment has its
own concept of shared libraries, release status, version control etc,
and you can easily end
up with incompatibilities if processes need to talk to each other, or
different versions of
header files. The newer lowrisc releases just extract the minimum stuff
needed to boot from a Debian image,
and then puts this into an initramfs. A further point is that the
startup script assumes some sort of network
connection, if you do not have this it could cause the sysvinit process
to fail. The new release uses systemd
which has a higher memory overhead, but launches threads in parallel
such that a stuck network connection does not
prevent the overall boot from completing.
I raised a further point yesterday in respect of Ariane treatment of I/O
devices.
openhwgroup/cva6#356
This could be relevant to your problems.
Meanwhile you can experiment with the instructions here for the
forthcoming official lowRISC Ariane release:
https://kimmitt.uk/docs/docs/
If you use the so-called rescue Linux image, it already does (most of)
what you are trying to achieve.
Regards,
Jonathan
…On 03/12/2019 07:18, monrick0303 wrote:
I use |buildroot of ariane-sdk| build image,
and i want to mount |rootfs.tar.xz of lowrsic| as real rootfs.
i modify init script of initramfs:
init_script
<https://user-images.githubusercontent.com/37597992/70027640-90d42780-15dd-11ea-90f9-f0bb64063cf2.png>
it will switch to real rootfs by |switch_root|.
During the linux boot process on Ariane:
|[ 27.512532] mmcblk0: mmc0:0000 SS04G 3.69 GiB|
|[ 28.270961] mmcblk0: p1 p2|
|Mounting SD root|
|[ 34.961062] random: fast init done|
|[ 39.051177] EXT4-fs (mmcblk0p2): recovery complete|
|[ 39.691713] EXT4-fs (mmcblk0p2): mounted filesystem with ordered
data mode. Opts: (null)|
|Mounting proc|
|Mounting sysfs|
|Mounting devtmpfs|
|Mounting devpts|
|Mounting tmpfs|
|Executing switch_root for mmc|
|INIT: version 2.93 booting|
|[ 93.129442] random: crng init done|
|[ 93.129442] random: crng init done|
|[info] Using makefile-style concurrent boot in runlevel S.|
|[info] Setting the system clock.|
|hwclock: Cannot access the Hardware Clock via any known method.|
|hwclock: Use the --verbose option to see the details of our search
for an access method.|
|[warn] Unable to set System Clock to: Thu Jan 1 00:02:56 UTC 1970 ...
(warning).|
|[ ok ] Activating swap...done.|
|[ 197.397739] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)|
|[ 197.397739] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)|
|[warn] Creating compatibility symlink from /etc/mtab to /proc/mounts.
... (warning).|
|[....] Checking file systems...fsck from util-linux 2.33.1|
|done.|
|[ ok ] Cleaning up temporary files... /tmp.|
|[ ok ] Mounting local filesystems...done.|
|[ ok ] Activating swapfile swap...done.|
|[ ok ] Cleaning up temporary files....|
|[ ok ] Starting Setting kernel variables: sysctl.|
|[....] Configuring network interfaces...Internet Systems Consortium
DHCP Client 4.4.1|
|Copyright 2004-2018 Internet Systems Consortium.|
|All rights reserved.|
|For info, please visit https://www.isc.org/software/dhcp/|
|[ 430.874833] Open device, request interrupt 3|
|[ 430.874833] Open device, request interrupt 3|
|Listening on LPF/eth0/23:01:00:89:07:02|
|Sending on LPF/eth0/23:01:00:89:07:02|
|Sending on Socket/fallback|
|Created duid "\000\001\000\001\307\222\276/#\001\000\211\007\002".|
|DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6|
|DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11|
|DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17|
|DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17|
|DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8|
|DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 2|
|No DHCPOFFERS received.|
|No working leases in persistent database - sleeping.|
|done.|
|[ ok ] Starting RPC port mapper daemon: rpcbind.|
|[ ok ] Starting NFS common utilities: statd idmapd.|
|[ ok ] Cleaning up temporary files....|
|INIT: Entering runlevel: 2|
It will stuck at |sbin/int| process,
sometime at |INIT: Entering runlevel: 2|,
or sometime at |[ ok ] Activating swapfile swap...done.|
I don't know why.
If I change |switch_root /mnt /sbin/int| to |chroot /mnt|,
during the linux boot process on Ariane:
|Executing chroot for mmc|
|bash: cannot set terminal process group (-1): Inappropriate ioctl for
device|
|bash: no job control in this shell|
|[ 89.290585] random: crng init done|
|[ 89.290585] random: crng init done|
***@***.***:/#|
It looks successful, except |bash: cannot set terminal process group
(-1): Inappropriate ioctl for device|
But I still want to use |switch_root|,
because it will delete all content of old rootfs(initramfs).
Can you help me?
Thanks You.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#147?email_source=notifications&email_token=AAEALVYTC7THGOEFIBBJK2TQWYB3VA5CNFSM4JUTHKF2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H5SJCYA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEALVZ752TDLJCDGVNGZH3QWYB3VANCNFSM4JUTHKFQ>.
|
Thanks you. |
These Ariane versions are largely the same apart from cache sizes. If
you build with the pulp-platform
you will get a different set of peripherals, but you can adjust the
startup scripts to suit.
However I am a little confused, why you are asking on the lowrisc-chip
issues github, if your intended
use is the pulp-platform ? On the whole it is a bad idea to mix and
match unless you want to take responsibility
for re-testing everything you use.
…On 03/12/2019 09:11, monrick0303 wrote:
Thanks you.
So I can use the so-called rescue Linux image run on ariane of
pulp-platform <https://github.com/pulp-platform/ariane> rather than
ariane of lowrisc
<https://github.com/lowRISC/lowrisc-chip/tree/ariane-v0.7> ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#147?email_source=notifications&email_token=AAEALV33RFGVXAD6NVWIIUTQWYPEJA5CNFSM4JUTHKF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFYUJTQ#issuecomment-561071310>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEALV3FO2JJC3T2LMEISVTQWYPEJANCNFSM4JUTHKFQ>.
|
Thanks You. In general, I will test more. |
Hello, Thanks your help. |
If you want to add or remove peripherals you need to make changes in at least three places:
If you only want to remove or disable a peripheral, it is sufficient to remove it from fpga/src/generic.dts
If you are having problems with unwanted startup services you can add extra mask commands in this makefile.inc and rerun the installation of the sd-card. |
So,if i don't want to rebuild the bitsteam,i just Now i can boot linux-5.3.8-lowrisc with bitstream of pulp-platform. Thanks your help! |
I haven't tried the pulp-platform bitstream recently. Last time I tried it it used the Xilinx SPI driver for the SD-Card. It works only in one-bit mode, but is supported by Linux. You will need to use a matching device tree blob and kernel. It will not work with the unmodified LowRISC config. You could prepare a kernel config which is a superset of what LowRISC and pulp-platform will require, but I don't understand the motivation for this. Another difference is the partition table, LowRISC uses a DOS partition to store the kernel, pulp-platform stores it in a boot partition. If you can explain why the lowrisc bitstream doesn't suit your purpose, I could be more helpful. |
Hello, following is boot process: Cannot find device "eth0" If you think you have received this message due to a bug rather exiting. 1.why there occur fail? And my reason is my team design a ip for ariane of pulp-platform. Thanks for your help. |
You probably managed to disable the Ethernet device driver amongst the various edits you have done. Needless to say if Ethernet is disabled, NFS and ssh will not work. Your best option right now would be to get the unmodified LowRISC design up and running on your board, and then compare the boot logs between my working version and your version. For example I would expect to see a message such as this:
early on during booting. If you don't get this either your device tree blob or kernel config (or Verilog) is wrong (the address may be different in pulp platform). You will appreciate it can be useful to combine outputs from different research groups in different countries, but it might not be the best starting point if you want to get something working quickly. Notwithstanding this, if you want to port your IP to the version of Ariane in lowRISC, I shall be happy to assist. Right now I see a problem, you have made modifications to an unsupported configuration, and you don't have a reference baseline to compare against, and you are asking for advice whilst failing to provide adequate information to justify the deviation from the expected path of development. It's unlikely any other potential users can benefit from this discussion, except as an example of how not to do it. This puts me in a difficult position, presuming to advice about a system of your own devising which I know next to nothing about. If I give you a bum steer, should I take the blame if your project fails? The best I can hope for is that at some point you will become sufficiently experienced to be able to cut your own swath. |
I use

buildroot of ariane-sdk
build image,and i want to mount
rootfs.tar.xz of lowrsic
as real rootfs.i modify init script of initramfs:
it will switch to real rootfs by
switch_root
.During the linux boot process on Ariane:
[ 27.512532] mmcblk0: mmc0:0000 SS04G 3.69 GiB
[ 28.270961] mmcblk0: p1 p2
Mounting SD root
[ 34.961062] random: fast init done
[ 39.051177] EXT4-fs (mmcblk0p2): recovery complete
[ 39.691713] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
Mounting proc
Mounting sysfs
Mounting devtmpfs
Mounting devpts
Mounting tmpfs
Executing switch_root for mmc
INIT: version 2.93 booting
[ 93.129442] random: crng init done
[ 93.129442] random: crng init done
[info] Using makefile-style concurrent boot in runlevel S.
[info] Setting the system clock.
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.
[warn] Unable to set System Clock to: Thu Jan 1 00:02:56 UTC 1970 ... (warning).
[ ok ] Activating swap...done.
[ 197.397739] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 197.397739] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[warn] Creating compatibility symlink from /etc/mtab to /proc/mounts. ... (warning).
[....] Checking file systems...fsck from util-linux 2.33.1
done.
[ ok ] Cleaning up temporary files... /tmp.
[ ok ] Mounting local filesystems...done.
[ ok ] Activating swapfile swap...done.
[ ok ] Cleaning up temporary files....
[ ok ] Starting Setting kernel variables: sysctl.
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
[ 430.874833] Open device, request interrupt 3
[ 430.874833] Open device, request interrupt 3
Listening on LPF/eth0/23:01:00:89:07:02
Sending on LPF/eth0/23:01:00:89:07:02
Sending on Socket/fallback
Created duid "\000\001\000\001\307\222\276/#\001\000\211\007\002".
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 2
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
done.
[ ok ] Starting RPC port mapper daemon: rpcbind.
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
It will stuck at
sbin/int
process,sometime at
INIT: Entering runlevel: 2
,or sometime at
[ ok ] Activating swapfile swap...done.
I don't know why.
If I change
switch_root /mnt /sbin/int
tochroot /mnt
,during the linux boot process on Ariane:
Executing chroot for mmc
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
[ 89.290585] random: crng init done
[ 89.290585] random: crng init done
root@ariane-fpga:/#
It looks successful, except
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
But I still want to use
switch_root
,because it will delete all content of old rootfs(initramfs).
Can you help me?
Thanks You.
The text was updated successfully, but these errors were encountered: