View Single Post
Old 03-29-2024, 04:44 PM   #2
bitfreak
Enthusiast
bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.
 
Posts: 36
Karma: 3790
Join Date: Jan 2024
Device: Kobo
Right, that figures..its used to identify a KOBO device. I keep forgetting that you guys support hundreds of devices.

However for my situation it was a problem and I figured that the boot loader space was identical for at least bunch of KOBO's (maybe all of them). So instead of testing for /bin/kobo_config.sh I tested on the presence of the hardware configuration hwcfg= in /proc/cmdline.

Code:
    local handle = io.popen("grep -o hwcfg= /proc/cmdline")
    local kobo_test_stat = handle:read("*line")
    handle:close()

--    local kobo_test_stat = lfs.attributes("/bin/kobo_config.sh")
    if kobo_test_stat then
        util.noSDL()
        return require("device/kobo/device")
    end
bitfreak is offline   Reply With Quote