[HP41] New storage drive on ARM (Raspberry PI2+PILBox+HP-IL+USB-Storage) - floppy - 10-31-2022 11:53 AM
Hello,
a raspberry pi2-B v1.1 can be used as a PIL-Storage; instead of a cassette drive.
Headless.
See photography.
Content (by side of the pi2):
a) raspbian OS
b) boot from SD card
c) virtual drive on an USB
d) PILBOX and HP-IL required
e) shutdown button for avoiding data corruption at shutdown
PM me for receiving the installation instructions if any need.
Overall costs of the attached disclosed setup Pi2+box+card+button+usb-storage approx 80Eur.
Pi4 is already tested/working.
Use with an HP71 was already ok checked on a Pi4 but not widely tested due to lack of knowledge.
I suppose it should be ok for HP71B and HP75 since it goes through HP-IL.
New in this? straight use of Giesselink x86 Windows binaries 32bits of ILPER and ILPILBOX on an ARM-board;
ARM is NOT x86;
via the "Box86" ARM application &
Wine 32bits x86 linux application.
Update 1:
you can connect a screen via the free HDMI port
you can connect USB mouse/keyboard via the 2 free USB ports
you can use it as printer (ILPER is started in a LXDE environment therefore full usable)
you can connect it to the internet via LAN (this is a PI2 = a bit slow)
Update 2:
2 more pictures of the button (hole in the housing made with a DREMEL mill)
RE: [HP41] New storage drive on ARM (Raspberry PI2+PILBox+HP-IL+USB-Storage) - floppy - 11-04-2022 05:51 PM
Installations instructions. Contact me via PM if any issue.
Updates made in it when necessary.
Code:
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Top of the file
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# command summary for install of the PIL storage drive
# on a raspberry pi board (version pi board must be >1)
#
# possible on several other ARM boards
# listed ARMs https://github.com/ptitSeb/box86/blob/master/docs/COMPILE.md
# Pandora
# Pyra
# Gameshell
# Raspberry Pi
# ODROID
# RK3399
# Tinker Board (1/1S) or RK3288
# Allwinner A64
# Snapdragon 845
# Phytium
# .. a lot should make it (if by hand)
#
# schematic / drawing
#
# +---------------------------------------------------+
# | |
# | HP-IL lines |
# | |
# | +-----------------------------------+ |
# | | | |
# | | | |
# | | +--+------+--+
# | | |............|
# | | |............|
# | | |............|
# | | |....HP-IL...|
# | | |............|
# | | |............|
# | | |............|
# | | |............|
# | | |............|
# +------+--------+------+ +------------------+------------+--+
# |......................| | |
# |......................| | |
# |......................| | HP 41 |
# |......................| | |
# |......................| | |
# |......................| +----------------------------------+
# |......................| | |
# |......................| | |
# |........PIL-Box.......| | |
# |......................| | |
# |......................| | |
# |......................| | |
# |......................| | |
# |......................| | |
# |......................| | |
# |......................| | |
# |......................| | |
# |......................| | |
# +-----------+----------+ | |
# | | |
# | | |
# | | |
# | | |
# | | |
# USB Serial | | |
# line | | |
# | | |
# | | |
# | | |
# | | |
# | | |
# | +----------------------------------+
# |
# | +----+
# | |....|
# | |....| USB Storage device
# | |....|
# +--+-+ +----+
# |USB1| |USB2|
# |....| |....|
# +---+----+-+----+----------+
# |..........................|
# |..........................|
# |..........................|
# |..........................|
# |..........................|
# |..........................|
# |.........ARM Pi2..........|
# |........or others.........|
# |..........................|
# |..........................|
# |......................+---|
# |......................|...|
# |......................|...| HDMI-port if screen attached
# |......................|...|
# |......................+---|
# |..........................|
# |........SD boot card......| 5v / 220v
# |...........+----+.........+--------------------------
# |...........|....|.........|
# +-----------+----+---+--+--+
# |..|
# +--+ shutdown button
#
#
# this is very similar on a pi3 or pi4 (I tried to comment below
# where I could for these 2 boards)
# the script contain some area which are for pi4 only (64bits); these are marked
# read all lines before you apply
# all commands are done from a linux debian desktop or direct in the pi2 or
# via SSH from the desktop
# no idea how it would looks like on a windows PC with these commands
# probably you will have to start ubuntu nested in Windows10 then use the
# appropriate linux commands
# this script cannot be used one single time due to several reboots
# = make copy / paste of the commands to use them in a terminal at the pi
# or in a terminal connected via SSH to the pi
# the documentation of all commands for all pi models can be improved,
# contact me if i should improve this documentation since I am interested
# to improve this file for other users to make it more clear.
#
# use of the PIL-Storage device:
# connect the HP41 via HP-IL to a PILBOX at the USB of the pi
# on: connect the pi to 220v / 5v
# .. the pi boot
# the PIL storage drive is connected
# switch the HP41 on
# XEQ DIR on the HP41 just to see the drive is accessible
# then you can save / retrieve.. programs from the virtual drive of the USB
# off: if you have a screen, you can control the shutdown with a mouse
# or push the shutdown button and wait a bit to see nomore led blinking
# (you want to switch on again? push the button)
# take the voltage supply 220v / 5v off; only if the pi is down
# if you connect an HP71B, another drive for it is located at :7 which
# means use the comand CAT :7 to see the files in this another drive
#
# ask
# floppy @ https://www.hpmuseum.org/forum/
# if any question
#
# this file is under CC BY-NC-SA
# See https://creativecommons.org/licenses/
#
# history log
# 2022 Oct 21 file creation
# 2022 Oct 30 file first submission. Headless test open.
# 2022 Oct 31 headless tested on pi2
# 2022 Nov 04 upload into https://www.hpmuseum.org/forum/
# 2022 Nov 05 schematic picture at file top
# 2022 Nov 06 kernel version check added. few text comment / cosmetic changes
# 2022 Dec 09 few rework like HowTo ssh in an ealier place
# 2022 Dec 11 board list at the top of this file
# 2023 Dec 03 comment about HP71B added, called variant B / .vil files in it
# ........... file update: topic / chapter / why
# ........... file update: topic / chapter / why
# ........... file update: topic / chapter / why
# ........... file update: topic / chapter / why
# ........... file update: topic / chapter / why
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# install the OS on the PI 2B
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# download the zip file from there https://pimylifeup.com/download-raspbian/
# unzip the file with a file manager or the command unzip
# the file 2021-10-30-raspios-bullseye-armhf-lite.img should be now on your PC
# put the boot card SD Transcend SDHC 16GB in a PC port
# go into the superuser
# with GPARTED, reformat the whole SD in one FAT32 partition
# (in case it has already files on it)
su -
# give the password of your superuser on the PC
df -h
# since it show the SD was at sdd
# unmount the card
umount /dev/sdd1
# first clean it up (if not new) for avoiding booting into old data rest
dd if=/dev/zero of=/dev/sdd status=progress
# output..
#15959409152 bytes (16 GB, 15 GiB) copied, 5554 s, 2.9 MB/s
#dd: writing to '/dev/sdd': No space left on device
#31176705+0 records in
#31176704+0 records out
#15962472448 bytes (16 GB, 15 GiB) copied, 5559.44 s, 2.9 MB/s
#
# or format it as FAT32 before in GPARTED
# if it is a micro SD, try to avoid the use of an adapter (had issues with such device)
#
# write the image on the SD card (same for pi2..3..4)
dd if=/home/xxxxx/Downloads/2021-10-30-raspios-bullseye-armhf-lite.img of=/dev/sdd bs=4M conv=fsync status=progress
# output.. (it takes few minutes)
#466+0 records in
#466+0 records out
#1954545664 bytes (2.0 GB, 1.8 GiB) copied, 372.012 s, 5.3 MB/s
# disconnect all process in the superuser in case one still hang
sync
#
# = follow the commands from there:
# https://www.elektronik-kompendium.de/sites/raspberry-pi/2111501.htm
# now put the card into the PI2,
# connect an HDMI screen, a mouse and a keyboard
# or for more advanced user, connect it headless via SSH directly
# (look at internet advices; not listed here for now)
#
# connect the raspberry pi to the voltage supply, it will boot
#
# for me, the raspberry PI2 (and PI4) did not give anything at the screen.
# take the SD card out of it and edit it on another PC and
# update the lines below later in the file config.txt of the /boot/ of the SD card
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. adapt the boot parameters for the pi2 screen to work
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo nano /boot/config.txt
#
#hdmi_safe=1
#config_hdmi_boost=4
#dtparam=i2c_arm=off
#dtparam=spi=off
#dtoverlay=vc4-fkms-v3d
#dtoverlay=gpio-shutdown,gpio_pin=3
#max_framebuffers=2
#disable_overscan=1
#[all]
#gpu_mem=128
#enable_uart=0
##2 lines below necessary if 3G/1G not activ in your kernel therefore a new
##kerneln must be compiled later
# its a pi4? dont put that 2 lines hereafter because it has if from the start
# you dont know your kernel status? put the lines hereafter later after
# the custom kernel creation
#[pi2] # could be pi3 or pi4, so change this when you make a new kernel name
#kernel=kernel7.img
#
# in the config.txt uncomment the audio and camera setup (most likely no need)
# unmount the SD card
# take the SD card out of the PC
# put it again into the pi and boot it
# most likely it will show "raspberrypi login:", then give pi, then return
# and the password raspberry
#
# depending of the keyboard it can be pressing raspberry or raspberrz
#
# the pi will most likely boot into a UK keyboard which means
# you will have to press for example "B" = Beta on a german keyboard to see
# "-" appearing
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. update localisation Options (in a screen on the pi)
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo raspi-config
# choose option 5 Localisation Options
# .. Timezone and Keyboard
# choose option 8 Update
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. SSH activation (optional use if you can master this)
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo raspi-config
#
#..
# Choose option 3 Interface Options
# Choose option I2 SSH
# Choose <Yes>
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# change the password to "pilstorage" on pi2 (you can use another pw)
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# the default user is pi, defaultpassword is in the link hereafter
# https://tutorials-raspberrypi.com/raspberry-pi-default-login-password/
passwd
# ... inputs
# raspberry # original pw on a pi2
# pilstorage
# pilstorage
########################## or ########################################
sudo raspi-config
# choose option 6 Advanced Options
# choose S3 Password
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. autologging in pi user
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo raspi-config
#
#..
#Choose option: 1 System Options
#Choose option: S5 Boot / Auto Login
#Choose option: B2 Console Autologin
# (or B4 Desktop Auto Login if Desktop installed)
# (or repeat that autologin when you will have installed the Desktop)
# (see Desktop install later)
#Select Finish
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. hostname setup (name visible in your network) to "pilstorage"
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# look at https://pimylifeup.com/raspberry-pi-hostname/
sudo raspi-config
#
#..
#Choose option: Network Options
#Choose option: Hostname
#pilstorage
#then ENTER
#Select Finish, and reboot the Raspberry Pi.
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. Expand the filesystem for the whole SD card
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo raspi-config
# choose option 6 Advanced Options
# choose A1 Expand Filesystem
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# update the packages of the OS on the PI 2B
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# connect the raspberry pi to the LAN cable first
#
# if it dont connect to the internet automatically,
# verify your router connection or setup as per below
################## update your dhcpcd configuration #########################
# my file /etc/dhcpcd.conf content is hereafter for going into the internet
#hostname
#clientid
#persistent
#option rapid_commit
#option domain_name_servers, domain_name, domain_search, host_name
#option classless_static_routes
#option interface_mtu
#require dhcp_server_identifier
#slaac private
#interface eth0
#static ip_address=192.168.178.52/24
#static routers=192.168.178.1
#static domain_name_servers=192.168.178.1
#
# and change /etc/systemd/system/dhcpcd.service.d/wait.conf to
#[Service]
#ExecStart=
#ExecStart=/usr/sbin/dhcpcd -q -w
#
sudo dhcpcd -g
sudo dhcpcd -k
#
################################################################################
sudo apt update
#this can take few long minutes. so, be patient
sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoclean
sudo apt autoremove
sudo reboot
# if any very good reason (will make a firmware upgrade); mostly dont do it
#sudo rpi-update
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. identify the USB ports geography for the devices
# (you can put in all hardware later)
# (4 ports if it is a pi2 or pi4; if you have only 1 USB port, connect
# an USB hub; it could be necessary to have an USB hub with voltage support)
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# top left USB pilbox
# top right (optional) USB mouse
# bottom left USB storage drive
# bottom right (optional) USB keyboard
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. verify this is a PI 2 or 3 or 4
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# not 1, else no Wine can be installed therefor we can stop here
# confirm this is a 32bits ARM. if 64bits, more commands to be used later
#
dmesg
# Output.. Machine model: Raspberry Pi 2 Model B Rev 1.1
#
#.. show what?.. lets have a deeper look
cat /proc/cpuinfo
#
#.. show
#
#processor : 0
#model name : ARMv7 Processor rev 5 (v7l)
#BogoMIPS : 38.40
#Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
# vfpd32 lpae evtstrm
#CPU implementer : 0x41
#CPU architecture: 7
#CPU variant : 0x0
#CPU part : 0xc07
#CPU revision : 5
#
#processor : 1
#model name : ARMv7 Processor rev 5 (v7l)
#BogoMIPS : 38.40
#Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
# vfpd32 lpae evtstrm
#CPU implementer : 0x41
#CPU architecture: 7
#CPU variant : 0x0
#CPU part : 0xc07
#CPU revision : 5
#
#processor : 2
#model name : ARMv7 Processor rev 5 (v7l)
#BogoMIPS : 38.40
#Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
# vfpd32 lpae evtstrm
#CPU implementer : 0x41
#CPU architecture: 7
#CPU variant : 0x0
#CPU part : 0xc07
#CPU revision : 5
#
#processor : 3
#model name : ARMv7 Processor rev 5 (v7l)
#BogoMIPS : 38.40
#Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
# vfpd32 lpae evtstrm
#CPU implementer : 0x41
#CPU architecture: 7
#CPU variant : 0x0
#CPU part : 0xc07
#CPU revision : 5
#
#Hardware : BCM2835
#Revision : a01041
#Serial : 000000006b8bbcc4
#Model : Raspberry Pi 2 Model B Rev 1.1
#
# "neon" indicated in the front of the cpu function list is mandatory
#
#.. from
#.. https://de.wikipedia.org/wiki/Raspberry_Pi
# 32bits
#
# or here..
# https://picockpit.com/raspberry-pi/your-64-bit-raspberry-pi-os-questions-answered/
# .. How do I check if my Raspberry Pi is 64 or 32 bit?
# If you have a Raspberry Pi 1, 2 and Zero, you have a 32-bit Raspberry Pi.
# If you have the Zero 2, Pi 3, 4 and corresponding Compute Modules,
# you have a 64 bit Pi. See this table for more info:
# see link above
#
# to see/check the RAM available
free -h
# total used free shared buff/cache available
#Mem: 870Mi 53Mi 708Mi 0.0Ki 108Mi 767Mi
#Swap: 99Mi 0B 99Mi
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. install lxde desktop: a screen/keyboard/mouse is the preferred
# Desktop environment necessary for winecfg and ILPER etc. later
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo apt install xserver-xorg
sudo apt install lxde-core lxappearance
sudo reboot
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. screensaver off (will save CPU power) and will not disturb later
# during the use
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo nano ~/.config/lxsession/LXDE/autostart
#should have following below inside the file
#@lxpanel --profile LXDE
#@pcmanfm --desktop --profile LXDE
#@xset s off
#@xset -dpms
#@xset s noblank
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. Install Midnight Commander for having a file management system
# in a SSH terminal. Recommended. Not mandatory.
# I use it for the transfer of files between the pi and my home router
# (on the router are some generic files like HP41.jpg from other PCs
# for creating the icons of the scripts disclosed later)
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo apt-get install mc
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. Install htop for looking at cpu usage
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# start the install only if the cpu load is low. If the cpu load is high,
# then shutdown the (optional only!) processes
sudo apt-get install htop
htop
# output looks good? next steps..
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. look at the free place on the SD card
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
free -h
#or
df -h
#
#all fine so far? Enough room?
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#xxxxxxx Configure to a 3G/1G kernel if not already in place xxxxxxxxxxxxxxx
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# .. IF this is not done. we must do it.
# .. lets check this
sudo modprobe configs
uname -m
#
gunzip < /proc/config.gz | grep VMSPLIT
# ... output
## CONFIG_VMSPLIT_3G is not set
## CONFIG_VMSPLIT_3G_OPT is not set
#CONFIG_VMSPLIT_2G=y
## CONFIG_VMSPLIT_1G is not set
#
# .. this is not done for the pi2. we must do it. Should be CONFIG_VMSPLIT_3G=y
# .. this should be already done on a pi4
#
# https://ptitseb.github.io/box86/COMPILE.html
# A build for model 2, 3 and 4 can be done.
# Model 1 and 0 cannot (at least not with Dynarec, as they lack NEON support)
#
#https://ptitseb.github.io/box86/X86WINE.html#examples
#
#https://www.novaspirit.com/2019/04/15/run-x86-arm/
#https://www.raspberrypi.com/documentation/computers/linux_kernel.html
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#xxxxxxxxx cross compile a new kernel 3G/1G on another PC xxxxxxxxxxxxxxxxxx
#xxxxxxxxx if you dont want it takes long on your pi2 xxxxxxxxxxxxxxxxxx
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
cd ~/Downloads
sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev
sudo apt install crossbuild-essential-armhf
git clone --depth=1 https://github.com/raspberrypi/linux
cd linux
# look @ https://www.raspberrypi.com/documentation/computers/linux_kernel.html
# because some parameters of the 2 lines below are different for pi3 and 4
KERNEL=kernel7 # name for pi2
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig
nano .config
#.. change from VMSPLIT_2G=y to VMSPLIT_3G=y if not already like it
# https://www.novaspirit.com/2019/04/15/run-x86-arm/
nproc
# will give out how many processors you have on your pc
# put the number after the "- j" below. below it was done on a processor of 6
make -j 6 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs
# take the SD card out of the PI and put on the PC
lsblk
# sdf1 8:81 1 256M 0 part /media/pascal/boot = fat32
# sdf2 8:82 1 29,5G 0 part /media/pascal/rootfs = ext4
mkdir mnt
mkdir mnt/fat32
mkdir mnt/ext4
su -
#(password)
cd /home/user/Downloads/linux
sudo mount /dev/sdf1 mnt/fat32
sudo mount /dev/sdf2 mnt/ext4
sudo env PATH=$PATH make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- \
INSTALL_MOD_PATH=mnt/ext4 modules_install
KERNEL=kernel7
sudo cp mnt/fat32/$KERNEL.img mnt/fat32/$KERNEL-backup.img
sudo cp arch/arm/boot/zImage mnt/fat32/$KERNEL.img
sudo cp arch/arm/boot/dts/*.dtb mnt/fat32/
sudo cp arch/arm/boot/dts/overlays/*.dtb* mnt/fat32/overlays/
sudo cp arch/arm/boot/dts/overlays/README mnt/fat32/overlays/
sudo umount mnt/fat32
sudo umount mnt/ext4
#
#.. modify the boot config file for defining a link to the kernel
#.. if not already done
sudo nano /boot/config.txt
#...
#[pi2]
#kernel=kernel7.img
#..
# Put the card back into the pi, boot it
#
# check your lastest compiled kernel was booted
dmesg
#[ 0.000000] Booting Linux on physical CPU 0xf00
#[ 0.000000] Linux version 5.15.74-v7+ (pascal@ProDesk)
# (arm-linux-gnueabihf-gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld
# (GNU Binutils for Debian) 2.35.2) #1 SMP Mon Oct 24 20:52:56 CEST 2022
#[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
#[ 0.000000] CPU: div instructions available: patching division code
#[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
# instruction cache
#...
#
# yes. "1 SMP Mon Oct 24 20:52:56 CEST 2022" is the latest kernel
# if not, check the name, place, config.txt file why it was not used at boot
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. install Box86 via pi-apps which has first to be installed
# the first install did not work for me on the pi2 (old binaries?)
# if I remember it worked on the pi4 with pi-apps straight
# you can try to install wine with pi-apps too instead of manual install
# which is indicated below later
# however, just compile (see later in this file) Box86. An easy task
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
wget -qO - https://raw.githubusercontent.com/Botspot/pi-apps/master/install | bash
#
#.. click on the icon "Apps" at the screen. Choose Box86. Install Box86.
# then eventually update the Apps
sudo apt-get full-upgrade
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. install Box86 with new compile in case the straight install with pi-apps
# was not working: first install failed for me (issue with x86emu)
# second install manually had an updated box86 git content for my pi2
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# https://github.com/ptitSeb/box86/blob/master/docs/COMPILE.md
cd ~
git clone https://github.com/ptitSeb/box86
cd box86
mkdir build
cd build
# -DRPI4=1 for Pi4 (use `-DRPI2=1` etc for other models)
cmake .. -DRPI2=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
#
make
# "make -j2 .. etc." was overloading my PI2 SWAP
sudo make install
sudo systemctl restart systemd-binfmt
sudo reboot
#
# for an updated box86 to be compiled again do following below
# (if the Box86 maintener informed you he made an update in github)
#
# cd ~
# cd box86
# git pull origin master
#
# .. and again all other commands above from "cd build" on
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#.. Install wine 32bits (if the install with pi-apps did not worked straight)
# this is what I had to do manually on the pi2 and a pi4
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Details there https://ptitseb.github.io/box86/X86WINE.html#examples
# (read all carefully)
#
wineserver -k
rm -rf ~/.cache/wine
rm -rf ~/.local/share/applications/wine
sudo mv ~/wine ~/wine-old
sudo mv ~/.wine ~/.wine-old
sudo mv /usr/local/bin/wine /usr/local/bin/wine-old
sudo mv /usr/local/bin/wineboot /usr/local/bin/wineboot-old
sudo mv /usr/local/bin/winecfg /usr/local/bin/winecfg-old
sudo mv /usr/local/bin/wineserver /usr/local/bin/wineserver-old
#
wbranch="devel" #example: devel, staging, or stable
# (wine-staging 4.5+ requires libfaudio0:i386 - see below)
wversion="7.1"
#example: 7.1
wid="debian"
#example: debian, ubuntu
wdist="bullseye"
#example (for debian): bullseye, buster, jessie, wheezy, etc
wtag="-1"
#example: -1 (some wine .deb files have -1 tag on the end and some don't)
#
cd ~/Downloads
wget https://dl.winehq.org/wine-builds/${wid}/dists/${wdist}/main/binary-i386/wine-${wbranch}-i386_${wversion}~${wdist}${wtag}_i386.deb
# download
wget https://dl.winehq.org/wine-builds/${wid}/dists/${wdist}/main/binary-i386/wine-${wbranch}_${wversion}~${wdist}${wtag}_i386.deb
# (required for wine_i386 if no wine64 / CONFLICTS WITH wine64 support files)
dpkg-deb -x wine-${wbranch}-i386_${wversion}~${wdist}${wtag}_i386.deb wine-installer
# extract
dpkg-deb -x wine-${wbranch}_${wversion}~${wdist}${wtag}_i386.deb wine-installer
mv wine-installer/opt/wine* ~/wine # install
rm wine*.deb # clean up
rm -rf wine-installer # clean up
#
# Install shortcuts (make 32bit launcher & symlinks. Credits: grayduck, Botspot)
echo -e '#!/bin/bash\nsetarch linux32 -L '"$HOME/wine/bin/wine \
"'"$@"' | sudo tee -a /usr/local/bin/wine >/dev/null
# Create a script to launch wine programs as 32bit only
#sudo ln -s ~/wine/bin/wine /usr/local/bin/wine # You could aslo just make a symlink, but box86 only works for 32bit apps at the moment
sudo ln -s ~/wine/bin/wineboot /usr/local/bin/wineboot
sudo ln -s ~/wine/bin/winecfg /usr/local/bin/winecfg
sudo ln -s ~/wine/bin/wineserver /usr/local/bin/wineserver
sudo chmod +x /usr/local/bin/wine /usr/local/bin/wineboot \
/usr/local/bin/winecfg /usr/local/bin/wineserver
#
#
# BELOW ONLY FOR A PI3 or PI4 64bits ADDITIONALLY TO THE LINES ABOVE
# These packages are needed for running wine on a 64-bit RPiOS via multiarch
karch=$(uname -m)
if [ "$karch" = "aarch64" ] || [ "$karch" = "aarch64-linux-gnu" ] || [ "$karch" = "arm64" ] || [ "$karch" = "aarch64_be" ]; then
sudo dpkg --add-architecture armhf && sudo apt-get update # enable multi-arch
sudo apt-get install -y libasound2:armhf libc6:armhf libglib2.0-0:armhf libgphoto2-6:armhf libgphoto2-port12:armhf \
libgstreamer-plugins-base1.0-0:armhf libgstreamer1.0-0:armhf libldap-2.4-2:armhf libopenal1:armhf libpcap0.8:armhf \
libpulse0:armhf libsane1:armhf libudev1:armhf libusb-1.0-0:armhf libvkd3d1:armhf libx11-6:armhf libxext6:armhf \
libasound2-plugins:armhf ocl-icd-libopencl1:armhf libncurses6:armhf libncurses5:armhf libcap2-bin:armhf libcups2:armhf \
libdbus-1-3:armhf libfontconfig1:armhf libfreetype6:armhf libglu1-mesa:armhf libglu1:armhf libgnutls30:armhf \
libgssapi-krb5-2:armhf libkrb5-3:armhf libodbc1:armhf libosmesa6:armhf libsdl2-2.0-0:armhf libv4l-0:armhf \
libxcomposite1:armhf libxcursor1:armhf libxfixes3:armhf libxi6:armhf libxinerama1:armhf libxrandr2:armhf \
libxrender1:armhf libxxf86vm1 libc6:armhf libcap2-bin:armhf # to run wine-i386 through box86:armhf on aarch64
#
# This list found by downloading...
# wget https://dl.winehq.org/wine-builds/debian/dists/bullseye/main/binary-i386/wine-devel-i386_7.1~bullseye-1_i386.deb
# wget https://dl.winehq.org/wine-builds/debian/dists/bullseye/main/binary-i386/winehq-devel_7.1~bullseye-1_i386.deb
# wget https://dl.winehq.org/wine-builds/debian/dists/bullseye/main/binary-i386/wine-devel_7.1~bullseye-1_i386.deb
# then `dpkg-deb -I package.deb`. Read output, add `:armhf` to packages in dep list, then try installing them on Pi aarch64.
#
fi
#
#
# Now for whatever PI version
#
#These packages are needed for running wine-staging on RPiOS
sudo apt install libstb0 -y
cd ~/Downloads
wget -r -l1 -np -nd -A "libfaudio0_*~bpo10+1_i386.deb" \
http://ftp.us.debian.org/debian/pool/main/f/faudio/
#
# Download libfaudio i386 no matter its version number
dpkg-deb -xv libfaudio0_*~bpo10+1_i386.deb libfaudio
sudo cp -TRv libfaudio/usr/ /usr/
rm libfaudio0_*~bpo10+1_i386.deb # clean up
rm -rf libfaudio # clean up
#
# Download winetricks
sudo apt-get install cabextract -y
cd ~/Downloads
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
sudo chmod +x winetricks
sudo mv winetricks /usr/local/bin/
sudo reboot
#
# Boot wine
wine wineboot
# .. output
# Box86 with Dynarec v0.2.7 7d863efc built on Oct 26 2022 16:46:28
# ALL FINE? .... nearly! it show the date of the compiled Box86 version we
# have made
#
winecfg
#
#if issue to start this, lets debug a bit and show the errors
#BOX86_LOG=3 winecfg
# and post them into a raspberry pi forum https://forums.raspberrypi.com/
# the maintener of Box86 will help
#
# eventually Run Winetricks (was not necessary for me)
BOX86_NOBANNER=1 winetricks dotnet20sp2
#
#look at details there howto do it correctly
# https://ptitseb.github.io/box86/X86WINE.html#examples
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. configure wine
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
winecfg
# use the OS win7
# uncheck in „graphics“ „Allow the window manager to decorate the window“
# (for using the full ILPER menues content and setups).
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. setup the usb storage device
# when you put it into an USB port
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# see https://www.elektronik-kompendium.de/sites/raspberry-pi/2012181.htm
# preferably go into another PC and start the application GPARTED at the screen
# for formatting the USB storage with ntfs
# use ntfs file system for the windows user accessing it later on other PCs
# especially the microsoft windows PCs
# define a label name; "ILPERSTO" was choosen here
# then update the ARM board setup
sudo nano /etc/fstab
# include this
##LABEL=ILPERSTO /media/usb1 ntfs auto,nofail,sync,users,rw,noatime,nobarrier 0 0
# then go out after saving the file
sudo mkdir -p /media/usb1
#
sudo mount -a
sudo reboot
# check if it is there
lsblk
# and its size
df -h
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. install ILPER and ILPILBOX
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# go into the pi user main area when the pi is booted
cd ~
mkdir ILPILBOX
mkdir ILPER
# download the windows binaries from here https://hp.giesselink.com/hpil.htm
cd ILPILBOX
wget https://hp.giesselink.com/Runtime/vcredist2005_x86.exe
wget https://hp.giesselink.com/HPIL/Ilpilbox1.64.zip
# expand the binairies into the created directories
unzip Ilpilbox1.64.zip
cd ~/ILPER
wget https://hp.giesselink.com/HPIL/ilper2.4.zip
unzip ilper2.4.zip
wine /home/pi/ILPILBOX/vcredist2005_x86.exe
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. more DLLs to de downloaded
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# mfc80.dll from here https://de.dll-files.com/mfc80.dll.html
# then put into ILPER .. AND .. ILPILBOX installation directory
# and in the V41 (if used/installed) installation directory
# mfc80u.dll
# then put into ILVIDEO80 installation directory if you use this
# when you connect an HP71 and the PI to a screen
# correct fonts in /home/pi/.wine/drive_c/windows/Fonts (for V41)
# LCD.fon LCD4.ttf lucon.ttf
#
# start the programs to see if it is ok
wine /home/pi/ILPER/ilper.exe
wine /home/pi/ILPILBOX/ilpilbox.exe
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. create the start-file of the application
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo nano /home/pi/pildrive_appli.sh
# then put following content inside it
#
##!/bin/bash
#echo "PIL storage device"
#wine '/home/pi/ILPILBOX/ilpilbox.exe' '/start' 'C:\\users\pi\ILBox1.vil' &
#wait 30
#wine '/home/pi/ILPER/ilper.exe' '/start' 'C:\\users\pi\ILPer1.vil' &
#wait 30
#
# go out (it store it) and make it executable (in a file manager)
#
# then create the files ILBox1.vil and ILPer1.vil in the directory
# /home/pi/.wine/drive_c/users/pi/
#
# file ILBox1.vil
[Run]
App=H:\home\pi\ILPILBOX\ilpilbox.exe
[Settings]
WinPosX=0
WinPosY=0
AddrOut=localhost
PortOut=60001
PortIn=60000
Port=COM1
BaudRate=0
PilboxIDY=0
EnableRFC=1
#
# file ILPer1.vil
[Run]
App=H:\home\pi\ILPER\ilper.exe
[Settings]
WinPosX=527
WinPosY=0
Port=TCP/IP
BaudRate=0
PilboxIDY=0
AddrOut=localhost
PortOut=60000
PortIn=60001
AutoExtAddr=0
LoopPosScope=10
LoopPosPrinter=20
LoopPosDisk1=30
LoopPosDisk2=40
LoopPosDosLink=50
[Scope]
Scope=1
EnableRFC=1
EnableIDY=1
[Printer]
AID=46
ID$=DISPLAY\r\n
[Disk1]
ID$=HP9114B\r\n
HDFile=H:\media\usb1\hp9114b.dat
HDTracks=80
HDSides=2
HDSectors=16
[Disk2]
ID$=HDRIVE1
HDFile=H:\media\usb1\HDRIVE1.DAT
HDTracks=125
HDSides=8
HDSectors=64
[DosLink]
ID$=DOSLINK
FileOut=outfile.dat
FileIn=infile.dat
#
sudo reboot
cd ~
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. variant B compatible for HP41 or HP71B
# .. create the start-file of the application
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
##!/bin/bash
## /home/pi/hp7141hw_appli.sh
#echo "HW interfacing tools"
#wine '/home/pi/ILPILBOX/ilpilbox.exe' '/start' 'C:\\users\pi\ILBox2.vil' &
#wait 10
#wine '/home/pi/ILPER/ilper.exe' '/start' 'C:\\users\pi\ILPer2.vil' &
#wait 10
#wine '/home/pi/ILPER/ilper.exe' '/start' 'C:\\users\pi\ILPer3.vil' &
#wait 10
#echo "HW interfacing tools"
#
# go out (it store it) and make it executable (in a file manager)
#
# where the .vil files are ..
#
# ILBox2.vil
#
[Run]
App=H:\home\pi\ILPILBOX\ilpilbox.exe
[Settings]
WinPosX=797
WinPosY=139
AddrOut=localhost
PortOut=60001
PortIn=60000
Port=COM1
BaudRate=0
PilboxIDY=0
EnableRFC=1
#
# ILPer2.vil
#
[Run]
App=H:\home\pi\ILPER\ilper.exe
[Settings]
WinPosX=322
WinPosY=417
Port=TCP/IP
BaudRate=0
PilboxIDY=0
AddrOut=localhost
PortOut=60002
PortIn=60001
AutoExtAddr=0
LoopPosScope=10
LoopPosPrinter=20
LoopPosDisk1=30
LoopPosDisk2=40
LoopPosDosLink=50
[Scope]
Scope=0
EnableRFC=1
HDTracks=80
HDSides=2
HDSectors=16
[Disk2]
ID$=HDRIVE1
HDFile=H:\media\usb1\HDRIVE16.DAT
HDTracks=125
HDSides=8
HDSectors=64
[DosLink]
ID$=DOSLINK
FileOut=outfile.dat
FileIn=infile.dat
#
sudo reboot
cd ~
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. create icons on the Desktop in case you would like to stop/start it with
# a screen
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
nano /home/pi/Desktop/PILSTO.desktop
# put following content in it
#
#[Desktop Entry]
#Name=HP & Pilbox ILPer
#Comment=this is an icon for starting all interfacing with wine
#Exec=bash /home/pi/pildrive_appli.sh
#Type=Application
#Terminal=false
#Icon=/home/pi/H41.jpg
#
#Make the application start immediately after double clicking on it;
#PCManFM file manager > Edit > Preferences > General Tick the box
#"Don't ask options on launch executable file“.
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. variant B for having HP41 or HP71 in the same setup
# .. create icons on the Desktop in case you would like to stop/start it with
# a screen
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
## /home/pi/Desktop/HP7141_IL.desktop
#[Desktop Entry]
#Name=PILBoxILPerVideo80.desktop
#Comment=this is an icon for starting all emulators with wine
#Exec=bash /home/pi/hp7141hw_appli.sh
#Type=Application
#Terminal=false
#Icon=/home/pi/HPLogo.jpg
#
#Make the application start immediately after double clicking on it;
#PCManFM file manager > Edit > Preferences > General Tick the box
#"Don't ask options on launch executable file“.
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. update the fonts (especially if you are starting VIDEO80 later with an HP71
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo apt-get install msttcorefonts
sudo reboot
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. update the inputs fields of ILPER and ILPILBOX if the .vil files setup
# did not work
# look at examples there https://hp.giesselink.com/hpil.htm
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#both Drive field of the ILPER application menue must be filled with an existing
#dat file name at a correct recognized drive location;
#else the USB storage drive file will not be found automatically.
# you will get the DAT files from the ILPER zip file of Giesselink
# put both on the USB drive
#
# working example: HP41
#
# ILPILBOX
# field Out TCP : localhost
# field Out Port: 6001
# field In Port : 6000
# PIL-Box Link: COM1
#
# ILPER
# field Drive HP9114B: click the menue and seach for the file
# (on mine it was H:\media\usb1\hp9114b.dat)
# field Drive HDRIVE1: click the menue and seach for the file
# (on mine it was H:\media\usb1\HDRIVE1.DAT)
# field PIL-Box Link: TCP/IP
# in TCP/IP menue..
# field Out TCP : localhost
# field Out Port: 6001
# field In Port : 6000
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. variant B for HP41 or HP71 with the same setup
# .. update the inputs fields of ILPER and ILPILBOX and ILVIDEO
# look at examples there https://hp.giesselink.com/hpil.htm
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#both Drive field of the ILPER application menue must be filled with an existing
#dat file name at a correct recognized drive location;
#else the USB storage drive file will not be found automatically.
# you will get the DAT files from the ILPER zip file of Giesselink
# put both on the USB drive
#
# working example: HP41 or HP71B
#
# ILPILBOX
# field Out TCP : localhost
# field Out Port: 6001
# field In Port : 6000
# PIL-Box Link: COM2
# .. unclick the field IDY Frames
#
# ILPER first (to be reached by the HP41 w/o IO module)
# field Drive HP9114B: click the menue and seach for the file
# (on mine it was H:\media\usb1\hp9114b.dat)
# field Drive HDRIVE1: click the menue and seach for the file
# (on mine it was H:\media\usb1\HDRIVE1.DAT)
# field PIL-Box Link: TCP/IP
# in TCP/IP menue..
# field Out TCP : localhost
# field Out Port: 6002
# field In Port : 6001
#
# ILPER second (to be reached by the HP71 )
# field Drive HP9114B: click the menue and seach for the file
# (on mine it was H:\media\usb1\hp9114b2.dat)
# field Drive HDRIVE1: click the menue and seach for the file
# (on mine it was H:\media\usb1\HDRIVE16.DAT)
# field PIL-Box Link: TCP/IP
# in TCP/IP menue..
# field Out TCP : localhost
# field Out Port: 6003
# field In Port : 6002
#
# ILVIDEO 92198
# field Out TCP : localhost
# field Out Port: 6000
# field In Port : 6003
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. make the file /home/pi/pildrive_appli.sh executed at boot
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# https://www.makeuseof.com/how-to-run-a-raspberry-pi-program-script-at-startup/
sudo nano /etc/xdg/autostart/bootpildrive.desktop
#
#with following content
#
#[Desktop Entry]
#Name=PIL drive
#Comment=this is an automatic start script
#Exec=bash /home/pi/pildrive_appli.sh
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. or variant B for using HP41 OR HP41 on the same setup
## file stored in /etc/xdg/autostart/bootpildrive.desktop
#[Desktop Entry]
#Name=Pil storage
#Comment=this is for starting ilpilbox and ilper
#Exec=bash /home/pi/hp7141hw_appli.sh
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. implement shutdown button
# screw a button on the case, which can connect 2 GPIOs
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# for avoiding corrupting the SD boot card by violent voltage supply cuts
# a plan B would be to shutdown by SSH using
#sudo shutdown -h 0
# look at https://www.stderr.nl/Blog/Hardware/RaspberryPi/PowerButton.html
sudo nano /boot/config.txt
# add line
#
#dtoverlay=gpio-shutdown,gpio_pin=3
#
# save and exit config.txt
# place a pushbutton between GPIO3 and GND (pin 5 and 6 on the 40-pin header)
# example for the PI2, look at the picture below
# https://learn.microsoft.com/de-de/windows/iot-core/learn-about-hardware/pinmappings/pinmappingsrpi
sudo reboot
#
# ----> your PIL-Storage device should work.
# you can connect to a screen for non-headless (printing / video80)
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. post reduced size photographies in the forum
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
convert 20221031_101006.jpg -quality 10% button.jpg
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Bottom of the file
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
EnableIDY=1
[Printer]
AID=46
ID$=DISPLAY\r\n
[Disk1]
ID$=HP9114B\r\n
HDFile=H:\media\usb1\hp9114b.dat
HDTracks=80
HDSides=2
HDSectors=16
[Disk2]
ID$=HDRIVE1
HDFile=H:\media\usb1\HDRIVE1.DAT
HDTracks=125
HDSides=8
HDSectors=64
[DosLink]
ID$=DOSLINK
FileOut=outfile.dat
FileIn=infile.dat
#
# ILPer3.vil
#
[Run]
App=H:\home\pi\ILPER\ilper.exe
[Settings]
WinPosX=1128
WinPosY=413
Port=TCP/IP
BaudRate=0
PilboxIDY=0
AddrOut=localhost
PortOut=60000
PortIn=60002
AutoExtAddr=0
LoopPosScope=10
LoopPosPrinter=20
LoopPosDisk1=30
LoopPosDisk2=40
LoopPosDosLink=50
[Scope]
Scope=0
EnableRFC=1
EnableIDY=1
[Printer]
AID=46
ID$=DISPLAY\r\n
[Disk1]
ID$=HP9114B\r\n
HDFile=H:\media\usb1\hp9114b2.dat
HDTracks=80
HDSides=2
HDSectors=16
[Disk2]
ID$=HDRIVE1
HDFile=H:\media\usb1\HDRIVE16.DAT
HDTracks=125
HDSides=8
HDSectors=64
[DosLink]
ID$=DOSLINK
FileOut=outfile.dat
FileIn=infile.dat
#
sudo reboot
cd ~
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. create icons on the Desktop in case you would like to stop/start it with
# a screen
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
nano /home/pi/Desktop/PILSTO.desktop
# put following content in it
#
#[Desktop Entry]
#Name=HP & Pilbox ILPer
#Comment=this is an icon for starting all interfacing with wine
#Exec=bash /home/pi/pildrive_appli.sh
#Type=Application
#Terminal=false
#Icon=/home/pi/H41.jpg
#
#Make the application start immediately after double clicking on it;
#PCManFM file manager > Edit > Preferences > General Tick the box
#"Don't ask options on launch executable file“.
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. variant B for having HP41 or HP71 in the same setup
# .. create icons on the Desktop in case you would like to stop/start it with
# a screen
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
## /home/pi/Desktop/HP7141_IL.desktop
#[Desktop Entry]
#Name=PILBoxILPerVideo80.desktop
#Comment=this is an icon for starting all emulators with wine
#Exec=bash /home/pi/hp7141hw_appli.sh
#Type=Application
#Terminal=false
#Icon=/home/pi/HPLogo.jpg
#
#Make the application start immediately after double clicking on it;
#PCManFM file manager > Edit > Preferences > General Tick the box
#"Don't ask options on launch executable file“.
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. update the fonts (especially if you are starting VIDEO80 later with an HP71
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo apt-get install msttcorefonts
sudo reboot
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. update the inputs fields of ILPER and ILPILBOX if the .vil files setup
# did not work
# look at examples there https://hp.giesselink.com/hpil.htm
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#both Drive field of the ILPER application menue must be filled with an existing
#dat file name at a correct recognized drive location;
#else the USB storage drive file will not be found automatically.
# you will get the DAT files from the ILPER zip file of Giesselink
# put both on the USB drive
#
# working example: HP41
#
# ILPILBOX
# field Out TCP : localhost
# field Out Port: 6001
# field In Port : 6000
# PIL-Box Link: COM1
#
# ILPER
# field Drive HP9114B: click the menue and seach for the file
# (on mine it was H:\media\usb1\hp9114b.dat)
# field Drive HDRIVE1: click the menue and seach for the file
# (on mine it was H:\media\usb1\HDRIVE1.DAT)
# field PIL-Box Link: TCP/IP
# in TCP/IP menue..
# field Out TCP : localhost
# field Out Port: 6001
# field In Port : 6000
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. variant B for HP41 or HP71 with the same setup
# .. update the inputs fields of ILPER and ILPILBOX and ILVIDEO
# look at examples there https://hp.giesselink.com/hpil.htm
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#both Drive field of the ILPER application menue must be filled with an existing
#dat file name at a correct recognized drive location;
#else the USB storage drive file will not be found automatically.
# you will get the DAT files from the ILPER zip file of Giesselink
# put both on the USB drive
#
# working example: HP41 or HP71B
#
# ILPILBOX
# field Out TCP : localhost
# field Out Port: 6001
# field In Port : 6000
# PIL-Box Link: COM2
# .. unclick the field IDY Frames
#
# ILPER first (to be reached by the HP41 w/o IO module)
# field Drive HP9114B: click the menue and seach for the file
# (on mine it was H:\media\usb1\hp9114b.dat)
# field Drive HDRIVE1: click the menue and seach for the file
# (on mine it was H:\media\usb1\HDRIVE1.DAT)
# field PIL-Box Link: TCP/IP
# in TCP/IP menue..
# field Out TCP : localhost
# field Out Port: 6002
# field In Port : 6001
#
# ILPER second (to be reached by the HP71 )
# field Drive HP9114B: click the menue and seach for the file
# (on mine it was H:\media\usb1\hp9114b2.dat)
# field Drive HDRIVE1: click the menue and seach for the file
# (on mine it was H:\media\usb1\HDRIVE16.DAT)
# field PIL-Box Link: TCP/IP
# in TCP/IP menue..
# field Out TCP : localhost
# field Out Port: 6003
# field In Port : 6002
#
# ILVIDEO 92198
# field Out TCP : localhost
# field Out Port: 6000
# field In Port : 6003
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. make the file /home/pi/pildrive_appli.sh executed at boot
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# https://www.makeuseof.com/how-to-run-a-raspberry-pi-program-script-at-startup/
sudo nano /etc/xdg/autostart/bootpildrive.desktop
#
#with following content
#
#[Desktop Entry]
#Name=PIL drive
#Comment=this is an automatic start script
#Exec=bash /home/pi/pildrive_appli.sh
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. or variant B for using HP41 OR HP41 on the same setup
## file stored in /etc/xdg/autostart/bootpildrive.desktop
#[Desktop Entry]
#Name=Pil storage
#Comment=this is for starting ilpilbox and ilper
#Exec=bash /home/pi/hp7141hw_appli.sh
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. implement shutdown button
# screw a button on the case, which can connect 2 GPIOs
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# for avoiding corrupting the SD boot card by violent voltage supply cuts
# a plan B would be to shutdown by SSH using
#sudo shutdown -h 0
# look at https://www.stderr.nl/Blog/Hardware/RaspberryPi/PowerButton.html
sudo nano /boot/config.txt
# add line
#
#dtoverlay=gpio-shutdown,gpio_pin=3
#
# save and exit config.txt
# place a pushbutton between GPIO3 and GND (pin 5 and 6 on the 40-pin header)
# example for the PI2, look at the picture below
# https://learn.microsoft.com/de-de/windows/iot-core/learn-about-hardware/pinmappings/pinmappingsrpi
sudo reboot
#
# ----> your PIL-Storage device should work.
# you can connect to a screen for non-headless (printing / video80)
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# .. post reduced size photographies in the forum
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
convert 20221031_101006.jpg -quality 10% button.jpg
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Bottom of the file
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
RE: [HP41] New storage drive on ARM (Raspberry PI2+PILBox+HP-IL+USB-Storage) - Chr Yoko - 11-05-2022 06:21 PM
Thanks you Floppy for that interresting project.
RPi are now quite difficult to find on the market, so for my new 3D printer that needed one for control , i replaced the BOM's RPi by a "Stick PC" running a Celeron (that kind of tiny stick size PC that you plug to your TV HDMI port).
Win 10 was pre-installed on the internal SSD, but i replaced it by an Ubuntu Server version for Klipper printer controler.
So it may be possible to replace the RPi+SD by a Stick PC easy to find on Amazon and Ali.
A bit like an hammer to crush a fly, but that should work.
An other cheap and elegant option might be to use a Black or "Blue Pill" tiny board using an STM32 micro-controller similar to the one inside the largest SwissMicro calculators.
But that solution would need some good level of programing to get the HPIL layer and the cassette/diskette emulation working onto the STM32.
RE: [HP41] New storage drive on ARM (Raspberry PI2+PILBox+HP-IL+USB-Storage) - floppy - 11-05-2022 07:12 PM
Listed ARMs https://github.com/ptitSeb/box86/blob/master/docs/COMPILE.md
- Pandora
- Pyra
- Gameshell
- Raspberry Pi
- ODROID
- RK3399
- Tinker Board (1/1S) or RK3288
- Allwinner A64
- Snapdragon 845
- Phytium
.. a lot should make it (if by hand)
RE: [HP41] New storage drive on ARM (Raspberry PI2+PILBox+HP-IL+USB-Storage) - twoweims - 11-05-2022 08:36 PM
Thanks, Floppy.
This looks very interesting. I am just now going through setting this up on a Pi 3.
RE: [HP41] New storage drive on ARM (Raspberry PI2+PILBox+HP-IL+USB-Storage) - floppy - 01-01-2023 02:08 PM
Tester/debugger welcome in mainland EU; PM me if interested:
- (you have an HP41 or an HP71; you have a pilbox; you have an HP-IL interface)
- I send the PIL-Storage (base ARM Raspberry-PI2 in an housing; USB storage on it; a shutdown button on it)
- You use with HP41 and/or HP71
- You feedback
- I improve/adapt etc. (HP75?..) perhaps by sending/exchanging only SD cards
- You send back if no need/interest
RE: [HP41] New storage drive on ARM (Raspberry PI2+PILBox+HP-IL+USB-Storage) - Hiwi - 03-22-2023 03:12 PM
Hi floppy,
will it work on a raspi pico board?
Ralf
RE: [HP41] New storage drive on ARM (Raspberry PI2+PILBox+HP-IL+USB-Storage) - floppy - 03-22-2023 05:07 PM
(03-22-2023 03:12 PM)Hiwi Wrote: Hi floppy,
will it work on a raspi pico board?
Ralf
when I see the specs of a "raspi pico board", it has 1 USB interface therefore an usb hub would be necessary for connecting the pilbox and a storage drive.
According https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf this is an extension board for a raspberry pi. It means by using this board, the setup has to be done from a raspberry pi (however, why not.. only the setup in this thread is not for C/C++ but is only a configuration of raspbian on a raspberry pi. It would be a new task but outside of my competences).
when I see "A build for model 2, 3 and 4 can be done. Model 1 and 0 cannot (at least not with Dynarec, as they lack NEON support)" in https://github.com/ptitSeb/box86/blob/master/docs/COMPILE.md I guess not straight, but new C/C++ programs should be developed (no glue how).
A second hand raspberry pi2 for 20eur in ebay would keep the difficulties manageable.
RE: [HP41] New storage drive on ARM (Raspberry PI2+PILBox+HP-IL+USB-Storage) - EugeneNine - 03-22-2023 07:13 PM
The pico isn't an extension of the Pi, its s standalone microcontroller. Its like an Arduino or the MCU inside your microwave oven where the Raspberry Pi is a full (single board) computer like your phone/chromebook/laptop/desktop.
RE: [HP41] New storage drive on ARM (Raspberry PI2+PILBox+HP-IL+USB-Storage) - floppy - 04-19-2023 01:29 PM
(03-22-2023 03:12 PM)Hiwi Wrote: Hi floppy,
will it work on a raspi pico board?
Ralf
perhaps see there https://www.hpmuseum.org/forum/thread-1023-page-2.html?highlight=Arduino+il+drive
Edit: the recipe for Arduino can be seen there https://www.hpmuseum.org/forum/thread-1023-post-15508.html#pid15508
RE: [HP41] New storage drive on ARM (Raspberry PI2+PILBox+HP-IL+USB-Storage) - nickapos - 04-20-2023 10:56 AM
For can not find rpi in decent prices, you could use orangepi instead.
I have been using one for a while for my 3d printer.
RE: [HP41] New storage drive on ARM (Raspberry PI2+PILBox+HP-IL+USB-Storage) - floppy - 04-27-2023 03:43 PM
(04-20-2023 10:56 AM)nickapos Wrote: For can not find rpi in decent prices, you could use orangepi instead.
I have been using one for a while for my 3d printer.
Good point: think economical (a pi2 works and its eBay price is ok.. a pi4 works but the prices are becoming crazy).
The listed boards are there https://www.hpmuseum.org/forum/thread-19053-post-165953.html#pid165953
I could not see orangepi therefore I expect few calibrations.
Any successfull implementation feedback on an orangepi is welcome (especially the Box86 developper will be happy to hear this and can update his board list).
RE: [HP41] New storage drive on ARM (Raspberry PI2+PILBox+HP-IL+USB-Storage) - TallKey - 04-27-2023 06:22 PM
In the US Libre Computer boards are cheap and available and it is good to see full size HDMI support.
Have the this, supports EMMC storage, 4GB option. It is in an RPi 4 case and it is running Raspbian.
Considered this because it was less expensive
Check the specs to verify it meets your needs.
Have not a pil-box, yet. Will let floppy comment on the Libre vs all the others.
RE: [HP41] New storage drive on ARM (Raspberry PI2+PILBox+HP-IL+USB-Storage) - floppy - 12-02-2023 12:27 PM
Update
- picture now with separate battery pack (ANKER in this case).
- HP41 or HP71B can be connected to it (HP41 on the picture).
- In case you want to see a screen (not just the result of the commands on the HP41 or HP71B screen), just connect an HDMI and you will see Video80
PI2 on eBay have currently reasonable prices.
More speed? use a PI3 or Pi4 (higher spec, higher price).
Remark: an HDMI screen was connected to the PI2 for helping making the final setup of the COM and TCP/IP numbers and screen positions in the ILPER ILVIDEO ILPILBOX applications. Perhaps all setup only via SSH can be done and will work from scratch, but this was not tried so far. It means, be ready to have an HDMI screen for the setup. Just in case.
|