diff --git a/linux/buildroot-config-src/busybox.config b/linux/buildroot-config-src/wally/busybox.config similarity index 100% rename from linux/buildroot-config-src/busybox.config rename to linux/buildroot-config-src/wally/busybox.config diff --git a/linux/buildroot-config-src/linux.config b/linux/buildroot-config-src/wally/linux.config similarity index 100% rename from linux/buildroot-config-src/linux.config rename to linux/buildroot-config-src/wally/linux.config diff --git a/linux/buildroot-config-src/main.config b/linux/buildroot-config-src/wally/main.config similarity index 99% rename from linux/buildroot-config-src/main.config rename to linux/buildroot-config-src/wally/main.config index bcdd727f..7e5f68df 100644 --- a/linux/buildroot-config-src/main.config +++ b/linux/buildroot-config-src/wally/main.config @@ -8,6 +8,7 @@ BR2_HOST_GCC_AT_LEAST_5=y BR2_HOST_GCC_AT_LEAST_6=y BR2_HOST_GCC_AT_LEAST_7=y BR2_HOST_GCC_AT_LEAST_8=y +BR2_HOST_GCC_AT_LEAST_9=y # # Target options @@ -87,7 +88,7 @@ BR2_BZCAT="bzcat" BR2_XZCAT="xzcat" BR2_LZCAT="lzip -d -c" BR2_TAR_OPTIONS="" -BR2_DEFCONFIG="./configs/wally-qemu_riscv64_virt_defconfig" +BR2_DEFCONFIG="./board/wally/main.config" BR2_DL_DIR="$(TOPDIR)/dl" BR2_HOST_DIR="$(BASE_DIR)/host" @@ -406,11 +407,10 @@ BR2_GENERATE_LOCALE="" # BR2_SYSTEM_ENABLE_NLS is not set # BR2_TARGET_TZ_INFO is not set BR2_ROOTFS_USERS_TABLES="" -BR2_ROOTFS_OVERLAY="" +BR2_ROOTFS_OVERLAY="./board/wally/rootfs_overlay" BR2_ROOTFS_POST_BUILD_SCRIPT="" BR2_ROOTFS_POST_FAKEROOT_SCRIPT="" -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" +BR2_ROOTFS_POST_IMAGE_SCRIPT="" # # Kernel @@ -430,7 +430,7 @@ BR2_LINUX_KERNEL_PATCH="" # BR2_LINUX_KERNEL_USE_DEFCONFIG is not set # BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG is not set BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="./linux.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="./board/wally/linux.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="" BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH="" BR2_LINUX_KERNEL_IMAGE=y @@ -473,7 +473,7 @@ BR2_LINUX_KERNEL_GZIP=y # Target packages # BR2_PACKAGE_BUSYBOX=y -BR2_PACKAGE_BUSYBOX_CONFIG="./busybox.config" +BR2_PACKAGE_BUSYBOX_CONFIG="./board/wally/busybox.config" BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="" # BR2_PACKAGE_BUSYBOX_SHOW_OTHERS is not set # BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES is not set diff --git a/linux/buildroot-config-src/wally/rootfs_overlay/.profile b/linux/buildroot-config-src/wally/rootfs_overlay/.profile new file mode 100644 index 00000000..65dccfef --- /dev/null +++ b/linux/buildroot-config-src/wally/rootfs_overlay/.profile @@ -0,0 +1,37 @@ +echo "Hello this ~/.profile is meant to demonstrate running some basic commands on Wally." +echo "I am $(whoami)" +echo "And I am on $(hostname)" +touch myFile.txt +echo "This is a line of text." > myFile.txt +echo "A second line of text." >> myFile.txt +mkdir myDir +mv myFile.txt myDir +echo "Created myFile.txt and moved it to myDir. It contains:" +cat myDir/myFile.txt +touch myScript.sh +echo "echo \"Hello this is another example script\"" > myScript.sh +chmod +x myScript.sh +echo "Created myScript.sh. Running it yields:" +./myScript.sh +cd myDir +ln -s ../myScript.sh symLinkToMyScript.sh +echo "Created symLinkToMyScript.sh. Running it yields:" +./symLinkToMyScript.sh +ln ../myScript.sh hardLinkToMyScript.sh +echo "Created hardLinkToMyScript.sh. Running it yields:" +./hardLinkToMyScript.sh +echo "Now let\'s remove all these example files and scripts" +cd / +rm -r myDir +rm myScript.sh +echo "Here is disk usage:" +df -h +echo "And here are the current processes:" +ps +echo "We can create a user." +cd / +mkdir home +echo "password\npassword\n" | adduser myUser +su -c "cd ~; echo \"I am $(whoami) (a new user) and my home directory is $(pwd)\"" +echo "And finally a login prompt." +login diff --git a/linux/buildroot-config-src/wally/rootfs_overlay/etc/inittab b/linux/buildroot-config-src/wally/rootfs_overlay/etc/inittab new file mode 100644 index 00000000..7ae8de33 --- /dev/null +++ b/linux/buildroot-config-src/wally/rootfs_overlay/etc/inittab @@ -0,0 +1,41 @@ +# /etc/inittab +# +# Copyright (C) 2001 Erik Andersen +# +# Note: BusyBox init doesn't support runlevels. The runlevels field is +# completely ignored by BusyBox init. If you want runlevels, use +# sysvinit. +# +# Format for each entry: ::: +# +# id == tty to run on, or empty for /dev/console +# runlevels == ignored +# action == one of sysinit, respawn, askfirst, wait, and once +# process == program to run + +# Startup the system +::sysinit:/bin/mount -t proc proc /proc +::sysinit:/bin/mount -o remount,rw / +::sysinit:/bin/mkdir -p /dev/pts /dev/shm +::sysinit:/bin/mount -a +::sysinit:/sbin/swapon -a +null::sysinit:/bin/ln -sf /proc/self/fd /dev/fd +null::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin +null::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout +null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr +::sysinit:/bin/hostname -F /etc/hostname +# now run any rc scripts +::sysinit:/etc/init.d/rcS + +# (commented out) Put a getty on the serial port +#console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL +# Actually no, let's automatically login +console::respawn:-/bin/sh + +# Stuff to do for the 3-finger salute +#::ctrlaltdel:/sbin/reboot + +# Stuff to do before rebooting +::shutdown:/etc/init.d/rcK +::shutdown:/sbin/swapoff -a +::shutdown:/bin/umount -a -r