diff --git a/Makefile b/Makefile index 081f5cb..23813ba 100644 --- a/Makefile +++ b/Makefile @@ -223,8 +223,8 @@ src/linux-sunxi: src/linux-librem5: @echo "WGET linux-librem5" @mkdir src/linux-librem5 - @wget -c https://source.puri.sm/Librem5/linux-next/-/archive/pureos/5.9.16+librem5.2/linux-next-pureos-5.9.16+librem5.2.tar.gz - @tar -xf linux-next-pureos-5.9.16+librem5.2.tar.gz --strip-components 1 -C src/linux-librem5 + @wget -c https://source.puri.sm/Librem5/linux-next/-/archive/pureos/5.12.2pureos3/linux-next-pureos-5.12.2pureos3.tar.gz + @tar -xvf linux-next-pureos-5.12.2pureos3.tar.gz --strip-components 1 -C src/linux-librem5 src/linux-sdm845: @echo "WGET linux-sdm845" diff --git a/initramfs/init b/initramfs/init index 3b2e1f8..1e64a52 100755 --- a/initramfs/init +++ b/initramfs/init @@ -35,6 +35,10 @@ mount -t configfs -o nodev,noexec,nosuid configfs /config mkdir -p /dev/pts mount -t devpts devpts /dev/pts +# add the debugfs +mkdir /debug +mount -t debugfs none /debug + # LED indicator for MMC r/w access if [ -n "$LED" ]; then echo $TRIGGER > /sys/class/leds/$LED/trigger @@ -49,11 +53,19 @@ fi echo "Creating device nodes..." mknod /dev/null c 1 3 mknod /dev/tty c 5 0 +# scan for devices mdev -s +# listen for new device creation +mdev -d + +# enable logging +mkdir -p /var/log +syslogd +klogd # Finishing rescue setup -start_serial_getty setup_usb_configfs +start_serial_getty start_udhcpd setup_telnetd diff --git a/initramfs/init_functions.sh b/initramfs/init_functions.sh index 3f0c9af..eb5ea5a 100755 --- a/initramfs/init_functions.sh +++ b/initramfs/init_functions.sh @@ -15,6 +15,7 @@ setup_usb_configfs() { usb_idVendor="0x1209" # Generic usb_idProduct="0x4201" # Random ID usb_serialnumber="Jumpdrive" + usb_acm_function="acm.GS0" usb_rndis_function="rndis.usb0" usb_mass_storage_function="mass_storage.0" @@ -33,7 +34,9 @@ setup_usb_configfs() { # shellcheck disable=SC2154 echo "$PRODUCT" > "$CONFIGFS/g1/strings/0x409/product" - # Create rndis/mass_storage function + # Create acm/rndis/mass_storage function + mkdir $CONFIGFS/g1/functions/"$usb_acm_function" \ + || echo " Couldn't create $CONFIGFS/g1/functions/$usb_acm_function" mkdir $CONFIGFS/g1/functions/"$usb_rndis_function" \ || echo " Couldn't create $CONFIGFS/g1/functions/$usb_rndis_function" mkdir $CONFIGFS/g1/functions/"$usb_mass_storage_function" \ @@ -46,7 +49,7 @@ setup_usb_configfs() { || echo " Couldn't create $CONFIGFS/g1/configs/c.1" mkdir $CONFIGFS/g1/configs/c.1/strings/0x409 \ || echo " Couldn't create $CONFIGFS/g1/configs/c.1/strings/0x409" - echo "rndis" > $CONFIGFS/g1/configs/c.1/strings/0x409/configuration \ + echo "acm + rndis" > $CONFIGFS/g1/configs/c.1/strings/0x409/configuration \ || echo " Couldn't write configration name" # Make sure the node for the eMMC exists @@ -62,7 +65,9 @@ setup_usb_configfs() { echo "JumpDrive eMMC" > $CONFIGFS/g1/functions/"$usb_mass_storage_function"/lun.0/inquiry_string echo "JumpDrive microSD" > $CONFIGFS/g1/functions/"$usb_mass_storage_function"/lun.1/inquiry_string - # Link the rndis/mass_storage instance to the configuration + # Link the acm/rndis/mass_storage instance to the configuration + ln -s $CONFIGFS/g1/functions/"$usb_acm_function" $CONFIGFS/g1/configs/c.1 \ + || echo " Couldn't symlink $usb_acm_function" ln -s $CONFIGFS/g1/functions/"$usb_rndis_function" $CONFIGFS/g1/configs/c.1 \ || echo " Couldn't symlink $usb_rndis_function" ln -s $CONFIGFS/g1/functions/"$usb_mass_storage_function" $CONFIGFS/g1/configs/c.1 \ diff --git a/src/info-purism-librem5.sh b/src/info-purism-librem5.sh index d59a7ba..962dc1d 100644 --- a/src/info-purism-librem5.sh +++ b/src/info-purism-librem5.sh @@ -6,6 +6,6 @@ SD=/dev/sda LED=green:status TRIGGER=mmc0 ERRORLINES=80 -SERIAL_CON=ttymxc0 +SERIAL_CON=ttyGS0 SERIAL_BAUD=115200 SLEEP=3 diff --git a/src/linux_config_librem5 b/src/linux_config_librem5 index 09dc0ed..39bc94f 100644 --- a/src/linux_config_librem5 +++ b/src/linux_config_librem5 @@ -211,6 +211,8 @@ CONFIG_KEYBOARD_IMX=y CONFIG_INPUT_JOYSTICK=y CONFIG_INPUT_TABLET=y CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_GOODIX=y +CONFIG_TOUCHSCREEN_EDT_FT5X06=y CONFIG_INPUT_MISC=y CONFIG_LEGACY_PTY_COUNT=16 CONFIG_SERIAL_8250=y @@ -247,6 +249,7 @@ CONFIG_PINCTRL_IMX8MQ=y CONFIG_GPIOLIB=y CONFIG_GPIO_SYSFS=y CONFIG_GPIO_DWAPB=y +CONFIG_GPIO_MXC=y CONFIG_GPIO_PL061=y CONFIG_GPIO_XGENE=y CONFIG_GPIO_PCA953X=y @@ -257,7 +260,11 @@ CONFIG_POWER_RESET_VEXPRESS=y CONFIG_POWER_RESET_SYSCON=y CONFIG_POWER_RESET_SYSCON_POWEROFF=y CONFIG_SYSCON_REBOOT_MODE=y +CONFIG_BATTERY_MAX17042=y +CONFIG_CHARGER_BQ25890=y CONFIG_SENSORS_ARM_SCPI=y +CONFIG_SENSORS_LM90=y +CONFIG_SENSORS_INA2XX=y CONFIG_THERMAL_WRITABLE_TRIPS=y CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y CONFIG_CPU_THERMAL=y @@ -267,6 +274,7 @@ CONFIG_THERMAL_EMULATION=y CONFIG_IMX_THERMAL=y CONFIG_QORIQ_THERMAL=y CONFIG_WATCHDOG=y +CONFIG_IMX2_WDT=y CONFIG_MFD_MAX77620=y CONFIG_MFD_ROHM_BD718XX=y CONFIG_REGULATOR=y @@ -283,10 +291,18 @@ CONFIG_DRM=y CONFIG_DRM_DP_AUX_CHARDEV=y CONFIG_DRM_LOAD_EDID_FIRMWARE=y CONFIG_DRM_DP_CEC=y +CONFIG_DRM_I2C_CH7006=y +CONFIG_DRM_I2C_SIL164=y +CONFIG_DRM_I2C_NXP_TDA9950=y +CONFIG_DRM_PANEL_SIMPLE=y CONFIG_DRM_PANEL_MANTIX_MLAF057WE51=y CONFIG_DRM_PANEL_SITRONIX_ST7703=y CONFIG_DRM_NWL_MIPI_DSI=y +CONFIG_DRM_SIMPLE_BRIDGE=y CONFIG_DRM_I2C_ADV7511=y +CONFIG_DRM_CDNS_MHDP8546=y +CONFIG_DRM_IMX_DCSS=y +CONFIG_DRM_IMX_CDNS_MHDP=y CONFIG_DRM_ETNAVIV=y CONFIG_DRM_MXSFB=y CONFIG_FB_MODE_HELPERS=y @@ -337,6 +353,7 @@ CONFIG_LEDS_LM3692X=y CONFIG_LEDS_GPIO=y CONFIG_LEDS_PWM=y CONFIG_LEDS_SYSCON=y +CONFIG_LEDS_LM3560=y CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_DISK=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y @@ -375,7 +392,9 @@ CONFIG_IIO_TRIGGER=y CONFIG_PWM=y CONFIG_PWM_IMX27=y CONFIG_RESET_CONTROLLER=y +CONFIG_RESET_IMX7=y CONFIG_PHY_XGENE=y +CONFIG_PHY_FSL_IMX8MQ_USB=y CONFIG_PHY_MIXEL_MIPI_DPHY=y CONFIG_POWERCAP=y CONFIG_IDLE_INJECT=y