Skip to content
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

Update configs to use -drive syntax everywhere, update mips64 to properly set root for kernel #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

enkiusz
Copy link

@enkiusz enkiusz commented Sep 16, 2022

Before the change the root= passed to the kernel for mips used /dev/hda instead of /dev/sda preventing the system from booting. I updated this as well as all of the -hda syntax to the more explicit -drive syntax while silencing the raw format warnings.

Please note, that for this fix also nongiach/arm_now_templates#3 needs to be applied as it fixes the template tar for mips.

Before change:

➜  ~ arm_now start mips64-n32
[+] Installed
Tempdir /tmp/tmp391fyzti
File not found by ext2_lookup
WARNING: e2rm file already suppressed
Starting qemu-system-mips64
stty intr ^]
       export QEMU_AUDIO_DRV="none"
       qemu-system-mips64 -kernel arm_now/kernel -hda arm_now/rootfs.ext2 -append 'root=/dev/hda console=ttyS0 rw physmap.enabled=0 noapic'                -m 256M                -nographic                -serial stdio -monitor null  -nic user                                 -no-reboot
       stty intr ^c
    
WARNING: Image format was not specified for 'arm_now/rootfs.ext2' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
Linux version 5.15.0 (br-user@runner-poenpasw-project-3290221-concurrent-0) (mips64-linux-gcc.br_real (Buildroot toolchains.bootlin.com-2021.11-1) 10.3.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP Mon Dec 27 10:20:12 UTC 2021
[....]
sd 0:0:0:0: [sda] 122880 512-byte logical blocks: (62.9 MB/60.0 MiB)
scsi 1:0:0:0: CD-ROM            QEMU     QEMU DVD-ROM     2.5+ PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] Attached SCSI disk
VFS: Cannot open root device "hda" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:

After change:

➜  ~ arm_now start mips64-n32                                 
WARNING: arm_now/ already exists, use --clean to restart with a fresh filesystem
File not found by ext2_lookup
WARNING: e2rm file already suppressed
File not found by ext2_lookup
WARNING: e2rm file already suppressed
Tempdir /tmp/tmpc54b03u1
File not found by ext2_lookup
WARNING: e2rm file already suppressed
Starting qemu-system-mips64
stty intr ^]
       export QEMU_AUDIO_DRV="none"
       qemu-system-mips64 -kernel arm_now/kernel -drive file=arm_now/rootfs.ext2,format=raw -append 'root=/dev/sda console=ttyS0 rw physmap.enabled=0 noapic'                -m 256M                -nographic                -serial stdio -monitor null  -nic user                                 -no-reboot
       stty intr ^c
    
Linux version 5.15.0 (br-user@runner-poenpasw-project-3290221-concurrent-0) (mips64-linux-gcc.br_real (Buildroot toolchains.bootlin.com-2021.11-1) 10.3.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP Mon Dec 27 10:20:12 UTC 2021
earlycon: uart8250 at I/O port 0x3f8 (options '38400n8')
printk: bootconsole [uart8250] enabled
CPU0 revision is: 000182a0 (MIPS 20Kc)
FPU revision is: 000f8200
OF: fdt: No chosen node found, continuing without
[....]
EXT4-fs (sda): mounting ext2 file system using the ext4 subsystem
EXT4-fs (sda): mounted filesystem without journal. Opts: (null). Quota mode: disabled.
VFS: Mounted root (ext2 filesystem) on device 8:0.
devtmpfs: mounted
Freeing unused kernel image (initmem) memory: 260K
This architecture does not have kernel memory protection.
Run /sbin/init as init process
process '/bin/busybox' started with executable stack
random: fast init done
EXT4-fs (sda): re-mounted. Opts: (null). Quota mode: disabled.
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Saving random seed: random: dd: uninitialized urandom read (512 bytes read)
OK
pcnet32 0000:00:0b.0 eth0: link up
press ctrl+] to kill qemu

Welcome to arm_now
buildroot login: 

antifob added a commit to antifob/arm_now that referenced this pull request May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant