On 1/8/25 02:24, Geert Uytterhoeven wrote:
Hi Rob,
On Tue, Jan 7, 2025 at 11:53 PM Rob Landley <r...@landley.net> wrote:
Microblaze has no /dev/?da (as in there's no device I could attach it to
even with the long option, I'd have to use NBD), sh4eb has -hda is
working but it's having some endianness hiccup with the network card
(works in sh4 but not sh4eb, I'm trying to track it down, I thought this
worked at one point), and the two "No kernel" ones legitimately have no
That's using sh_eth, right?
8139cp: 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)
8139cp 0000:00:02.0: enabling device (0000 -> 0003)
8139cp 0000:00:02.0 eth0: RTL-8139C+ at 0x(ptrval), 52:54:00:12:34:56,
IRQ 128
Is there a different driver I should use? That one works on sh4 little
endian with almost the same config.
Last time I tried booting a big endian ARM kernel on Koelsch (R-Car
M2-W), it booted fine until "unable to mount root" (I have no suitable
userspace), except for broken Ethernet, so it failed to obtain a
DHCP lease.
Miniconfig I'm using for 6.19 attached.
If you don't want to build mkroot's toybox+musl userspace yourself, the
initramfs.cpio.gz in the last release from
https://landley.net/bin/mkroot/0.8.11/sh4eb.tgz presumably still works,
using the instructions in run-qemu.sh. (I'm trying to get a new release
out, hence poking at targets that don't quite pass muster.)
You can also use the sh2eb fdpic userspace from the same directory, but
you'll need the "fdpic with mmu for sh" patch from
https://landley.net/bin/mkroot/0.8.11/linux-patches/0002-sh4-fdpic.patch
to enable the fdpic loader in your kernel config. (That's the current sh
big endian board I know people deploying today, but qemu doesn't emulate
it directly, so I run its userspace under qemu-system-sh4eb...)
I think I've built a working static busybox defconfig with
https://landley.net/bin/toolchains/25-03-2024/sh4eb-linux-musl-cross.tar.xz
too, although not recently. Might need to switch a command or two off?
The boot says "8139cp 0000:00:02.0 eth0: link down" and then pauses for
3 seconds while ntp fails to talk to time.google.com to set the clock
newer than 1970 (sadly no battery backed up clock in the board qemu's
emulating, there's config entries for one in the relevant kernel
defconfig but nothing in qemu last I checked), and then I get a shell
prompt that thinks it's 1970 and can't wget or scp with dropbear.
Rob
P.S: If you "./run-emulator.sh -hda file.img" the init script will try
to mount /dev/?da on /mnt for you, and then run /mnt/init if it exists
instead of a shell prompt. Easy automated testing.# make ARCH=sh allnoconfig KCONFIG_ALLCONFIG=linux-miniconfig
# make ARCH=sh -j $(nproc)
# boot zImage console=ttySC1 noiotrap
# architecture independent
CONFIG_PANIC_TIMEOUT=1
CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_RD_GZIP=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_SCRIPT=y
CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT2=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_UTF8=y
CONFIG_MISC_FILESYSTEMS=y
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_SQUASHFS=y
CONFIG_SQUASHFS_XATTR=y
CONFIG_SQUASHFS_ZLIB=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_NET=y
CONFIG_NETDEVICES=y
CONFIG_NET_CORE=y
CONFIG_NETCONSOLE=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IPV6=y
CONFIG_ETHERNET=y
CONFIG_COMPAT_32BIT_TIME=y
CONFIG_EARLY_PRINTK=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# architecture specific
CONFIG_CPU_SUBTYPE_SH7751R=y
CONFIG_MMU=y
CONFIG_VSYSCALL=y
CONFIG_SH_FPU=y
CONFIG_SH_RTS7751R2D=y
CONFIG_PCI=y
CONFIG_RTS7751R2D_PLUS=y
CONFIG_SERIAL_SH_SCI=y
CONFIG_SERIAL_SH_SCI_CONSOLE=y
CONFIG_NET_VENDOR_REALTEK=y
CONFIG_8139CP=y
CONFIG_BLK_DEV_SD=y
CONFIG_ATA=y
CONFIG_ATA_SFF=y
CONFIG_ATA_BMDMA=y
CONFIG_PATA_PLATFORM=y
CONFIG_BINFMT_ELF_FDPIC=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_MEMORY_START=0x0c000000
CONFIG_CPU_BIG_ENDIAN=y
# architecture extra